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 |
What is the class in java?
What are the names of Component subclasses that support painting?
What is the difference between serial and throughput garbage collector?
What is the life cycle of Servlet?
Why unicode is important?
How to display all the prime numbers between 1 and 100
How many types of gc are there in java?
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 the blank final variable?
Which class represents the socket that both the client and server use to communicate with each other?
Which language is java?
How can we make copy of a java object?