-
Parameter Constructor
Constructors in Java: A constructor in Java is a special method that is used to initialize objects. The constructor is called when an object of a class is created. It can be used to set initial values for object attributes. A constructor in Java is similar to a method that is invoked when an object…
-
class calling to anthor class-instance of object
Encapsulation The meaning of Encapsulation data is hidden from users. Java Packages & API (TBD) A package in Java is used to group related classes. Think of it as a folder in a file directory. We use packages to avoid name conflicts, and to write a better maintainable code. Packages are divided into two categories:…
-
global variable
what is Static variables : 1.Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. 2.There would only be one copy of each class variable per class, regardless of how many objects are created from it. 3.Static variables are rarely used…
-
method return statements
what is Concatenation? 1.Concatenation is the process of combining two or more strings. 2.In Java, two strings can be concatenated by using the + or += operator.Example 1: Java Type Casting Type casting is when you assign a value of one primitive data type to another type. Example: Type of variable: 1) Local Variable 2)…
-
Method Overloading
Argument Parameter When a function is called, the values that are passed in the call are called arguments. The values which are written at the time of the function prototype and the definition of the function. These are used in function call statement to send value from the calling function to the called function. These…
-
How to create object & method call & method definition
How to Create Object in Java The object is a basic building block of an OOPs language. In Java, we cannot execute any program without creating an object. There is various way to create an object in Java that we will discuss in this section, and also learn how to create an object in Java.…
-
what is variable and datatype
what is variable in java? Variable in Java is a data container that stores the data values during Java program execution. Every variable is assigned data type which designates the type and quantity of value it can hold. Variable is a memory location name of the data. The Java variables have mainly three types :…
-
What is Class and Object
what is class my unterstanding? search content and you prepare interview: anws–1 A class is a group of objects which have common properties. It is a template or blueprint from which objects are created. It is a logical entity. It can’t be physical. anws–2 1. Class is a set of object which shares common characteristics/…
-
Explain the java JDK:
why convert .java file into .class file ? class bassed oops (TBD) What is Java? Java is a widely used object-oriented programming language and software platform that runs on billions of devices, including notebook computers, mobile devices, gaming consoles, medical devices and many others. The rules and syntax of Java are based on the C…
-
java i find error
compile commant -Javac hello.java -this for file name Run commant-Java hello -this for .class name What is a class? 1.template used to create objects 2.A class is the blueprint define to objects are created. or class is a collection members and member of function. 3.Class are a set of instructions to build a specific type…