Java Programming Concepts Online Test

which statement is true about string and stringbuffer class in java?


which statement is true about Vector and ArryList in java


what will be the result of following programe?

public class HelloWorld {

public static void main(String[] args) {

Integer a=new Integer(2);

Integer b=new Integer(2);

System.out.println(b==a);

}

}


What is the output of following programe....?

public class HelloWorld {

static public void main(String[] args) {

System.out.println("The is no error");

}

}


which statement is not true about an Interface?


Select correct output of following programm

public class HelloWorld extends A {

public HelloWorld() {

System.out.println("Constructor of HelloWorld");

}

public static void main(String arg[]){

HelloWorld ob=new HelloWorld();

}

}

class A {

A() {

System.out.println("Constructor of A");

}

}


Which of the following is NOT a Java keyword?


Which of the following does not inherit from the Collection interface?


please select correct answer of following programe ...

public class Ternary {

public static void main(String args[])

{

int a = 5;

System.out.println("Value is - " + ((a < 5) ? 9.9 : 9.0));

}

}


select correct answer

public class HelloWorld {

public static void main(String arg[]){

int Output = 10;

boolean b1 = true;

if((b1 == true) && ((Output += 10) == 20))

System.out.println("We are equal " + Output);

else

System.out.println("Not equal! " + Output);

}

}






























































































Description:

I Create this Test for java programming concepts that we must know and we must be aware when we are codding. this test includes collection frame / API questions and and other core java topics like object oriented programming concepts.

Discussion

Mj Baloto

look at the question with the 9.0 as the answer.
The class has no ending bracket. Obviously, it will encounter an error on compilation :-/

946 days 1 hours 40 minutes ago

Kavya K

main method usually starts with "public static" and I think using "static public" will result in compilation error! Correct me if I am wrong.

1545 days 19 hours 19 minutes ago

Kavya K

main method usually starts with "public static" and I think using "static public" will result in compilation error!

1545 days 19 hours 20 minutes ago

6 Followers
Tests: 2

Your Facebook Friends on WizIQ

More Tests By Author

Java Simple Question
10 Questions | 584 Attempts