Explain the difference between abstract classes and interfaces in java?
No Answer is Posted For this Question
Be the First to Post Answer
Is it possible to override private or static method in java?
What does compareto () do in java?
What method is used to specify a container's layout in java programming?
How do you get the length of a string in java?
What are the important features of Java 11 release?
Is this valid in java ? Can we instantiate interface in java?
can we write two same methods in outer class and innerclass.
Can we declare a class as abstract without having any abstract method?
Explain about main thread in java?
Difference between predicate, supplier and consumer ?
Howmany address lines are required to addressing 1 MB memory?
8 Answers Beatroot Technologies, CSC, HCL, Hexaware, IBM,
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(); } }