What is the difference between a public and a non-public
class?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
public class is the one whose memebers can get an access to
all the classes in the same package and out of the package
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / javachi
public class is a class that can be accessed from anywhere in the package and outside the package, this public means access globaly.
there is no such non-public class in java. so we can consider private, protected, friendly classes as a non-public classes.
| Is This Answer Correct ? | 6 Yes | 1 No |
INTERVIEW QUESTION FOR ANDROID
Why java is used everywhere?
Definition for connection pooling?
Explain differences between collection api and stream api?
What are the advantages of java over C++?
Can we extend singleton class?
What is overriding in java?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
When do we use synchronized blocks and advantages of using synchronized blocks?
What is variable and rules of variable?
What is meant by string is immutable?
What is the order of method invocation in an Applet?