Inheritance Access the resources of the .class file after establish the relation is the concept of inheritance in java. Inheritance is the object-oriented concept which is used to create a relation between two .class files. Relation mean one .class file parent class(base class,super class ,master class) and another .class file. We can access the member […]
Category: Core JAVA
What is aggregation ?
Aggregation An aggregation is a special form of association. Access the resources of another .class file without creating any relation, that is the concept of Aggregation in java. It represents a HAS-A relationship. It is a more specialized version of the association relationship. Now, what is an association? In Java, when you think of a class having […]
Control Structure in JAVA
Control Structure in JAVA:- A control structure is a block of a program that analyzes the direction of the program in which to go based on a block. Programming language provide 5 types of control structure present in java:- Sequential control Structure Conditional control Structure Loop control Structure Selection control Structure Jump control Structure […]
What is Input from keyboard in java ?
Input from the keyboard:- Followings are the techniques through which we can take input from keyboard. By using scanner class. By using command line argument. By using buffer-reader. By using console class. By using data input stream reader. By using command line argument Command-line Argument Command line argument is a method which user will give inputs […]
What is Block in JAVA…?
BLOCK IN JAVA:- A block in Java is a group of one or more statements enclosed in braces.A block start with ( { ) and ends with ( } ). A block statement is generally used to group together several statements, so they can be used in a situation that requires you to use a single […]
Factory Method:- If the return type of method is class name then it is known as the Factory method. Private constructor defining a “virtual” constructor. Private Constructor:- The factory constructor declared with private-keyword is known as private-constructor. If the constructor is private we cannot create an object outside class. The private constructor is used to serve […]
Abstract and Anonymous class:- Abstract class:- If the class name is declared as an abstract keyword it is known as abstract class. An abstract class may or may not contain an abstract method. Abstract class and anonymous class almost equivalent to using a named inner class. If the class is abstract it cannot be instantiated(we […]
How to create the object of abstract class..? We can create the Object of Abstract class by two different ways. 1)By inheritance Access the resources of the .class file after establish the relation is the concept of inheritance in java. Inheritance is the object-oriented concept which is used to create a relation between two .class […]
Difference between method and constructor The following are the difference between method and constructor. Method name may or may not be the same as the class name whereas the constructor name must be same as the class name. A method should have a return type in java where are constructor never returns any value, so […]
Method or Function in Java
METHOD OR FUNCTION IN JAVA Java support 6 types of method Static method Non-static method Final method Abstract method Native method Synchronized method Static Method The method declared with the static keyword is known as a static method. If the method is static we can call it by class name, directly and object name. The […]
Constructor in JAVA
CONSTRUCTOR IN JAVA:- The constructor in Java is very similar to the method. The main job of the constructor is to initialize the object. The constructor is a block of code that initializes the newly created object. A constructor is called automatically when a new instance of an object is created. Each and every […]
Variable or data member in java
Variable/Data member:- The variable or data member in java is a block of memory which can store a data value. In Java, all the variable should be declared before they can be used. Java support 6 types of variable Local Variable Static Variable Non-static Variable Final Variable Transient Variable Volatile Variable Local Variable The variable […]
Class in java ?
Class:- Class in Java is the selection of similar types of object. From one class we can create n number f objects and n number of objects getting together to make a class. A class is declared using class keyword. Pro-grammatically class is nothing but a keyword which is used to declare any user-defined class. It is […]
Operator in JAVA
Operator in JAVA:- The operator is the symbol that performs a specific operation on one, two and three operands and returns a result. Operator in JAVA is a symbol that tells to the compiler to perform a certain manipulation. It is for manipulate data and variables. Java support total 44 no. of operators. Mainly operator […]
Data type and Wrapper class in java
DATAYPE AND WRAPPER CLASS DATATYPE Java language support the concept of primitive datatype like c or c++ If a language support primitive datatype that language cannot be a pure object oriented programming language. To make java language pure object oriented it supports the concept of wrapper class. As java language support the concept of architecture […]