What is protected and friendly?
Answer / priyavarzhni
Protected: the method of a class os accessed only when the
other class inherits it.
Friendly: no need for inheritance. we can access the methods
Is This Answer Correct ? | 3 Yes | 2 No |
State one difference between a template class and class template.
What is the difference between numeric and integer?
What are decalarations?
Is null a keyword in java?
Why does java not support pointers?
What are conditionals and its types?
Can a constructor have different name than a class name in java?
Explain all java features with real time examples
Is it possible to do method overloading and overriding at a time
Can we have any code between try and finally blocks?
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(); } }
What is variable and rules of variable?