Skip to content

Commit 45794cb

Browse files
Merge pull request kunal-kushwaha#477 from im-raj-b/patch-1
Update classes.txt
2 parents 3cf1675 + eadd3b7 commit 45794cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lectures/17-oop/notes/classes.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The key to Java’s safety is that you cannot manipulate references as you can a
2626
Thus, you cannot cause an object reference to point to an arbitrary memory location or manipulate it like an integer.
2727

2828
A Closer Look at new:
29-
class-var = new classname ( );
29+
classname class-var = new classname ( );
3030
Here, class-var is a variable of the class type being created. The classname is the name of the class that is being
3131
instantiated. The class name followed by parentheses specifies the constructor for the class. A constructor defines
3232
what occurs when an object of a class is created.
@@ -55,4 +55,4 @@ For example, square(100) passes 100 as an argument. Inside square( ), the parame
5555

5656
NOTE:
5757
Bus bus = new Bus();
58-
lhs(reference i.e. bus) is looked be compiler & rhs (object i.e. new Bus()) is looked by jvm
58+
lhs(reference i.e. bus) is looked be compiler & rhs (object i.e. new Bus()) is looked by jvm

0 commit comments

Comments
 (0)