what is the use of declaring constructor as private?
Answer Posted / suganya
prevent to access by other class even sub class cant have
permission to create object of that base class.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can we pass null as argument in java?
How do you take thread dump in java?
What is meant by the value of a variable?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
How do you create immutable object in java?
why are there separate wait and sleep methods? : Java thread
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
How can a gui component handle its own events?
what is deadlock? : Java thread
What does .equals do in java?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What is use of functional interface in java 8? Explain
Does string is thread-safe in java?
What is the technique adopted to create an immutable class?
Where are global variables stored?