Explain role of constructor in a java application?
Answer Posted / sonal
Without a constructor u cannot make an object or instance
of a class.
Every class must have a constructor. If no constructor is
provided the complier will provide default constructor at
run time.
| Is This Answer Correct ? | 33 Yes | 2 No |
Post New Answer View All Answers
Which programming language is most secure?
Do I need to import java.lang package any time? Why?
Is null a keyword in java?
What are the rules for variable declaration?
How does java enable high performance?
What modifiers are allowed for methods in an interface?
What is the difference between java applets and applications?
What happens if constructor is private?
What is classpath?
Can we convert stringbuffer to string?
When super keyword is used?
Write a code to show a static variable?
Java Compiler is stored in JDK, JRE or JVM?
What is core java called?
What is the purpose of using break in each case of switch statement?