Course Content

Course Content


When you instantiate an object in Java, you are creating a new instance of that object. This is done by using the new keyword followed by the name of the class. An example of instantiating an object in Java is as follows: Object o = new Object();

  • Variables in Java are declared by using the keyword “var” followed by the variable name.
  • To declare a variable of type String, we can use:
  • String myName = "John";
  • To declare a variable of type int, we can use:
  • int myAge = 42;

  • The three types of data in Java are primitive data, object data and reference data.
  • Primitive data is the simplest form of data in Java and includes numbers, characters and boolean values.
  • Object data refers to any type of class or interface that you create in Java.
  • Reference data is a pointer to an object or primitive variable.

A class is a blueprint for an object. It defines the object's properties and methods. An object is an instance of a class.

A Java class is a way of organizing your code into a set of related functions. It contains variables, methods, and constructors. Variables are used to store data that can be changed. Methods are used to perform tasks on the data stored in the variables. Constructors are used to initialize the values of the variables when an object is created.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere