JAVA QUIZ 5

32
Created on By Sirjana GhimireAcharya

JAVA QUIZ 5

1 / 10

1.What will be the output of Round(3.7).

2 / 10

2. How do you insert COMMENTS in Java code?

3 / 10

3. What guarantees type-safety in a collection?

4 / 10

4.Does Java supports goto?

5 / 10

5. Which of the following is true for an object having no reference variables referring to it?

6 / 10

6. Which of the following is FALSE about arrays on Java

7 / 10

7. Output of following Java program?

class Test
{
public static void main (String[] args)
{
int arr1[] = {1, 2, 3};
int arr2[] = {1, 2, 3};
if (arr1 == arr2)
System.out.println("Same");
else
System.out.println("Not same");
}
}

8 / 10

8.What is the result of the below lines of code?

class ascii_to_String {
public static void main(String args[])
{
int ascii[] = { 65, 66, 67, 68};
String str = new String(ascii, 1, 3);
System.out.println(str);
}
}

9 / 10

9.Which of the following is the correct difference in String on C and Java?

10 / 10

10. Is JDK required on each machine to run a Java program?

Your score is

The average score is 60%

0%