File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,12 @@ Core Java Interview Question
25
25
#### Q4 What do you mean by Constructor?
26
26
#### Constructor can be explained in detail with enlisted points:
27
27
28
- * When a new object is created in a program a constructor gets invoked corresponding to the class.
29
- * The constructor is a method which has the same name as the class name.
30
- * If a user doesn’t create a constructor implicitly a default constructor will be created.
31
- * The constructor can be overloaded.
32
- * If the user created a constructor with a parameter then he should create another constructor explicitly without a parameter.
28
+ * When a new object is created in a program a constructor gets invoked corresponding to the class.
29
+ * The constructor is a method which has the same name as the class name.
30
+ * If a user doesn’t create a constructor implicitly a default constructor will be created.
31
+ * The constructor can be overloaded.
32
+ * If the user created a constructor with a parameter then he should create another constructor explicitly without a parameter.
33
+
34
+ #### Q5 What is meant by the Local variable and the Instance variable?
35
+ * Local variables* are defined in the method and scope of the variables that exist inside the method itself.
36
+ * Instance variable* is defined inside the class and outside the method and the scope of the variables exists throughout the class.
You can’t perform that action at this time.
0 commit comments