No. Logic should never go in a constructor; constructors should only be used to instantiate and initialize object data.
No. Java does not support copy constructor
no you can have a class with no public methods and even with a a private constructor public class Example { //constructor private Example(){ } }
business logic ....refers to the domain specific logic rules,proc,and processes presentation logic......concerned with how objects are displayed to the user of the software
No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.
No.
No. Java does not support copy constructor
no you can have a class with no public methods and even with a a private constructor public class Example { //constructor private Example(){ } }
When any constructor is deffined in your class, the java compiler create a default no argument constructor for you. This constructor only have an invocation to the super class constructor (" super( ) ").
business logic ....refers to the domain specific logic rules,proc,and processes presentation logic......concerned with how objects are displayed to the user of the software
All Java programs would have a constructor... public class Test { public Test(){ ... } ..... } This is a constructor. Even if you dont code the constructor Java would automatically place a default constructor for compilation.
Constructor is used to do something (written in constructor) immediately after object creation.
No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.
No.
Java, unlike C++ does not support copy constructors.
NO, we cannot create a contructor for an interface in java.
Constructor is not an alternative to class. In Java, you create classes; the classes contain methods - including the constructor, which can be viewed as a special method. If you want to have a constructor, you need a class that surrounds it, so it's not one or the other.
Explicit means done by the programmer. Implicit means done by the JVM or the tool , not the Programmer. For Example: Java will provide us default constructor implicitly.Even if the programmer didn't write code for constructor, he can call default constructor. Explicit is opposite to this , ie. programmer has to write .