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.
बहत अच्छा है
Very helpful videos lectures
Thank you so much, sir
Very helpful in growing skill in making Android application