Java Basic Program Practice Test-6

What will be the output of the following java code?

public class Test {

int i = j = 15;

int j;

public static void main(String[] args) {

Test t = new Test();

System.out.println(t.j);

if ('c' == 15) {

System.out.println("welcome");
}

}

}

What will be the output of the following java code?

public class Test {

static boolean real() {

System.out.println("welcome");

return false;

}

public static void main(String[] args) {

if (real() | true) {

System.out.println("Java");

}

}

}

What will be the output of the following java code?

public class Test {

public static void main(String[] args) {

System.out.println(args.length);

for(String s:args)

{

System.out.println(s);

}

}

}

What will be the output of the following java code?

import java.io.Console;

public class Test {

public static void main(String[] args) {

Console c1 = System.console();

Console c2 = System.console();

System.out.println(c1 == c2);

}

}

What will be the output of the following java code?

public class Test {

public static void main(String[] args) {

for(int i=5;i>=0;--i)

{

if(i<3)

continue;

System.out.println(i);

}

}

}