Correct Answer: ClassName varName = new ClassName(arguments);
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Core Java Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Core Java MCQ Questions
True of False? The strictfp keyword ensures that you get the same result on every platform if you perform operations in the floating point variable.
Given following code, what will be the output: import java.lang.reflect.Method; class Bar { private int bar(int a) { return a * a; } } public class Foo { public static void main(String[] args) { try { Bar bar = new Bar(); Method method = bar.getClass().getDeclaredMethod("bar", int.class); method.setAccessible(true); System.out.println(method.invoke(bar, new Integer(5))); } catch (Exception e) { e.printStackTrace(); System.out.println("Error"); } } }
Interfaces are useful for...
The Object.wait() method:
Which will legally declare, construct, and initialize an array?
java.lang.Object is the super class of all the interfaces in java
A RuntimeException is...
what is order of preference in method overloading
Given a class containing the following pieces of code: public static <T> List getList() { return new ArrayList<T>(); } // ... List<?> list = new ArrayList<Integer>(); Adding which of the following lines would cause the class to not compile?
how java is platform independent?