Can we make a constructor final?
No Answer is Posted For this Question
Be the First to Post Answer
what is difference between equals and ==?
What is meant by singleton class?
what is the form of storage space in java?
What is the purpose of format function?
What is the difference between hashmap and hashtable in java?
How do you check if an arraylist is not empty?
Is there any sort function in java?
What is the use of using enum to declare a constant?
What is volatile data type?
What are data types in programming?
What is the use of optional ?
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(); } }