Skip to content

Commit 2259f8e

Browse files
authored
Update README.md
1 parent 0076ac2 commit 2259f8e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ Core Java Interview Question
2525
#### Q4 What do you mean by Constructor?
2626
#### Constructor can be explained in detail with enlisted points:
2727

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.

0 commit comments

Comments
 (0)