What are the difference between composition and inheritance in java?
No Answer is Posted For this Question
Be the First to Post Answer
Can a class declared as private be accessed outside it’s package?
Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }
Why is stringbuffer thread safe?
Difference between predicate, supplier and consumer ?
What is the full meaning of java?
What are the rules for variable declaration?
Can interface be private in java?
How can you take string into InputStream?
Explain the access modifiers for a class, method and variables?
While opening the file, what type of exceptions can be caught?
Garbage collection in java?
Difference between Superclass and Subclass?