Name the packages in JDK?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
java.lang
java.util
java.net
java.io
java.awt
java.sql
| Is This Answer Correct ? | 3 Yes | 1 No |
how can i take the inputs from users in java program?
What is string args [] in java?
List the three steps for creating an object for a class?
Can we use a default constructor of a class even if an explicit constructor is defined?
What is the purpose of return statement?
Explain role of constructor in a java application?
What is parameter example?
Why java does not support pointers?
whats is inheritance?
15 Answers CTS, HCL,
interface X{ void m1(); void m2(); } class Child2 extends Object implements X { public void m1(){ System.out.println("Child2 M1"); } public void m2(){ System.out.println("Child2 M2"); } } public class ParentChildInfterfaceDemo { public static void main(String[] args){ X x = new Child2(); X x1 = new Child2(); x.m1(); x.m2(); x.equals(x1); } } Will the above code work? If yes? Can you please explain why the code x.equals(x1) will work as the equals method is called on interface reference vaiable?
what is template design pattern?
Why does java not allow multiple public classes in a java file ?