Examveda
Examveda

What will be the output of the following Java program?
class String_demo 
{
    public static void main(String args[])
    {
        int ascii[] = { 65, 66, 67, 68};
        String s = new String(ascii, 1, 3);
        System.out.println(s);
    }
}

A. ABC

B. BCD

C. CDA

D. ABCD

Answer: Option B


This Question Belongs to Java Program >> Strings

Join The Discussion

Related Questions on Strings