with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Methods are nothing but the functions defined by the particular class.• Return type of the methode, • name of the method, • parameter passed to the method, • body of the method
Definition, Operation, Properties with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
• Definition: The constructor is a specialized method for initializing objects.Name of the constructor is same as that of its class name. In other words, the name of the constructor and class name is same.
with Example Java Program
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Each class is a collection of data and the functions that manipulate the data. The data components of the class are called data fields and the function components of the class are called member functions or methods.
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Arrays Example Programs Write a Java program to perform matrix addition, subtraction and multiplication.
with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
• Definition: Array is a collection of similar type of elements.• Using arrays the elements that are having the same data type can be grouped together.
with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Sometimes when we apply loops we need to come out of the loop on occurrence of particular condition. This can be achieved by break statement. Following program illustrates the use of break in the for loop.
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Control Statements Example Programs : 1.Write a Java program to find factorial of a given number.
with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Programmers can take decisions in their program with the help of control statements. Various control statements that can be used in java are - 1. if statement, 2. if else statement, 3. while statement, 4. do...while statement, 5. switch case statement, 6. for loop
types with example and Meaning, with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
The arithmetic operators are used to perform basic arithmetic operations. The operands used for these operators must be of numeric type. The Boolean type operands can not be used with arithmetic operators.
with Example Java Programs
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
Various data types used in Java are byte, short, int, long, char, float, double and boolean.
Definition, initialization, declaration, Example | Java
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
A variable is an identifier that denotes the storage location.Variable is a fundamental unit of storage in Java. The variables are used in combination with identifiers, data types, operators and some value for initialization.
Subject and UNIT: Object Oriented Programming: Unit I: Introduction to OOP and Java
The smallest individual and logical unit of the java statements are called tokens. In Java there are five types of tokens used. These tokens are - 1. Reserved keywords, 2. Identifiers, 3. Literals, 4. Operators, 5. Separators