Online Assessment Platform

ALL THE BEST!!!

ALL THE BEST!!!


JAVA- EC MADURAI OCT BATCH1 -01ST MARCH 2025

1 / 50

Which keyword in Java is used for exception handling?

2 / 50

Which of the following is true about the try-catch block?

3 / 50

What will be the output of the following Java code?

public class Main {
public static void main(String[] args) {
String str = "Hello" ;
str = "Bye";

System.out.println(str);
}
}

4 / 50

JRE stands for _______________

5 / 50

Can we keep a different name for the java class name and java file
name?

6 / 50

Which of the following is responsible for garbage collection in Java?

7 / 50

Which of these is the correct method to create an array in java?

8 / 50

Which of these is a type of variable in Java?

9 / 50

What are the types of memory allocated in memory in java?

10 / 50

What is the correct way to manually request garbage collection in Java?

11 / 50

Which of the following is the correct way to exit from all nested loops?

12 / 50

Is string mutable in Java?

13 / 50

What is the purpose of the finalize() method in Java?

14 / 50

Can we write a program without a main method in Java?

15 / 50

What will happen if an exception is thrown and not caught in a try-catch block?

16 / 50

What is the entry point of a program in Java?

17 / 50

Which keyword is used to handle exceptions in Java?

18 / 50

JDK stands for _________________

19 / 50

Which of the following statements is true?

20 / 50

Can the main() method be overloaded in Java?

21 / 50

An abstract class in Java:

22 / 50

Which command is used to compile a Java program?

23 / 50

Which of the following can be declared as final in java?

24 / 50

The break statement in Java is used to ______________

25 / 50

Which type of casting is lossy in Java?

26 / 50

Which of the following is a consequence of garbage collection?

27 / 50

Method used to take a string as input in Java?

28 / 50

Which keyword is used to implement an interface in Java?

29 / 50

Array in Java is ______________

30 / 50

What makes the Java platform independent?

31 / 50

Which of the following is true about String objects in Java?

32 / 50

Where are Java source files stored by convention?

33 / 50

Which block is used to specify a code that must be executed regardless of an exception being handled or not?

34 / 50

What does the concat() method do in Java?

35 / 50

What will be the output of the following Java code?

public class Main {
public static void main(String arg[]) {
int i;
for (i = 1; i <= 12; i +=2)

{ if (i == 8) {
System.out.println(i);
break;
}
}
}
}

36 / 50

What does the java command do?

37 / 50

In Java, objects are stored in:

38 / 50

Which method is used to compare two strings in Java?

39 / 50

Which of the following is a checked exception in Java?

40 / 50

Which of the following is the correct syntax to create a variable in
Java?

41 / 50

What is type casting in Java?

42 / 50

Which of the following is a correct way to declare an abstract method in Java?

43 / 50

What is the default filename extension for compiled Java files?

44 / 50

Finally block is attached to?

45 / 50

Which method is used to get the length of a String in Java?

46 / 50

After compilation, Java code is converted into:

47 / 50

Which class in Java is used to take input from the user?

48 / 50

Can the Java program accept input from the command line?

49 / 50

Multiline comment is created using ________________

50 / 50

Which of the following is true about interfaces in Java?