Wednesday 14 February 2018

What Is The Difference Between Object And Reference In Java || Learn Jav...


Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.




Source Code

--------------------------------

class Student

{
int roll;
String name;
String course;
Student(){}
Student(int roll, String name, String course)
{
this.roll=roll;
this.name=name;
this.course=course;
}
void display()
{
System.out.println("Name : "+name+" Roll : "+roll+" Course : "+course);
}
}
public class OvsR
{
public static void main(String args[])
{
Student ss = new Student();
ss.display();
Student ss1 = new Student(3,"Akram","MCA"); // ss1 holds the base address
ss1.display();
new Student(); // orphan reference
}
}
--------------------------

Description
--------------
What Is The Difference Between Object And Reference In Java.
Difference between object & object reference in java.
The video looks at what an object is and how to create one in Java.  It defines the terms memory reference,instantiation, class and object.It also looks at the syntax for creating an object.

1 comment:

  1. Nice video and nice blog.And it is very help full for me. I'm also a blogger and your blog and its content is good than my blog. So to see the simple codes of c, cpp, java or python please visit:
    https://ccpptutoriallands.blogspot.com

    ReplyDelete