SlideShare a Scribd company logo
6
Most read
8
Most read
13
Most read
Presentation2.ppt  java basic core ppt .
INTRODUCTION TO JAVA
• Java is a most popular, object-oriented, widely used
programming language and platform that is utilized for
Android development, web development, artificial
intelligence, cloud applications, and much more. So,
mastering this gives you great opportunities in bigger
organizations.
• Java was originally developed by James Gosling at Sun
Microsystems. It was released in May 1995 as a core
component of Sun Microsystems' Java platform
FIRST PROGRAM OF JAVA
// A Java program to print "Hello World"
public class KESHAV {
public static void main(String args[])
{
System.out.println("Hello World");
}
}
Output : Hello World
FEATURES OF JAVA
Presentation2.ppt  java basic core ppt .
• 1) SIMPLE: Java is simple to learn the concept of object oriented
programming.
• 2)Object Oriented:This reason makes java popular among developers.
Oop includes concepts of object and classes and many more.
JAVA USES
• GUI applications
• Web servers and applications servers
• Middleware applications
• Web applications
• Mobile applications
• Embedded systems
• Enterprise applications
• It is used for developing Android Apps
• Helps you to create Enterprise Software
• Wide range of Mobile java Applications
• Scientific Computing Applications
• Use for Big Data Analytics
• Java Programming of Hardware devices
• Used for Server-Side Technologies like Apache, JBoss, GlassFish, etc.
COMPONENTS OF JAVA
• 1 ) JAVA DEVELOPMENT KIT ( JDK )
• 2) JAVA VIRTUAL MACHINE ( JVM )
• 3) JAVA RUNTIME ENVIRONMENT ( JRE )
OPERATORS IN JAVA
1.Arithmetic Operators :
2.Unary Operators :
3.Assignment Operator :
4.Relational Operators
5.Logical Operators
6.Ternary Operator
7.Bitwise Operators
8.Shift Operators
Presentation2.ppt  java basic core ppt .
• What are Strings in Java?
• Strings are the type of objects that can store the character of
values. A string acts the same as an array of characters in Java.
ARRAYS IN JAVA
• Array in java is a group of like-typed variables referred to by a common name. Arrays in Java work
differently than they do in C/C++. Following are some important points about Java arrays.
• In Java, all arrays are dynamically allocated. (discussed below)
• Arrays are stored in contiguous memory [consecutive memory locations].
• Since arrays are objects in Java, we can find their length using the object property length. This is
different from C/C++, where we find length using sizeof.
• A Java array variable can also be declared like other variables with [] after the data type.
• The variables in the array are ordered, and each has an index beginning with 0.
• Java array can also be used as a static field, a local variable, or a method parameter.
• The size of an array must be specified by int or short value and not long.
• The direct superclass of an array type is Object.
• Every array type implements the interfaces Cloneable and java.io.Serializable.
• This storage of arrays helps us randomly access the elements of an array [Support Random Access].
• The size of the array cannot be altered(once initialized). However, an array reference can be made to
point to another array.
The general form of a one-dimensional array declaration
is
type var-name[];
OR
type[] var-name;
KEYWORDS IN JAVA
• Keywords or Reserved words are the words in a language
that are used for some internal process or represent some
predefined actions. These words are therefore not allowed
to use as variable names or objects.
JAVA CLASSES
• Java Classes
• A class in Java is a set of objects which shares common characteristics/ behavior and common properties/ attributes. It is
a user-defined blueprint or prototype from which objects are created. For example, Student is a class while a particular
student named Ravi is an object.
• Properties of Java Classes
1. Class is not a real-world entity. It is just a template or blueprint or prototype from which objects are created.
2. Class does not occupy memory.
3. Class is a group of variables of different data types and a group of methods.
4. A Class in Java can contain:
1. Data member
2. Method
3. Constructor
4. Nested Class
5. Interface
Types of Access Modifiers in Java
There are four types of access modifiers available in Java:
1.Default – No keyword required
2.Private
3.Protected
4.Public
1. Default Access Modifier
When no access modifier is specified for a class, method, or data member – It is
said to be having the default access modifier by default. The data members,
classes, or methods that are not declared using any access modifiers i.e. having
default access modifiers are accessible only within the same package.
2. Private Access Modifier
The private access modifier is specified using the keyword private. The methods or
data members declared as private are accessible only within the class in which they
are declared.
•Any other class of the same package will not be able to access these members.
•Top-level classes or interfaces can not be declared as private because
• private means “only visible within the enclosing class”.
• protected means “only visible within the enclosing class and any subclasses
3. Protected Access Modifier
The protected access modifier is specified using the keyword protected.
The methods or data members declared as protected are accessible within the
same package or subclasses in different packages
Presentation2.ppt  java basic core ppt .
Constructors in Java are used to initialize the values of the attributes of the object serving the goal to bring Java closer to the real world. We already have a
default constructor that is called automatically if no constructor is found in the code. But if we make any constructor say parameterized constructor in order
to initialize some attributes then it must write down the default constructor because it now will be no more automatically called.
Multiple Inheritance is a feature of an object-oriented concept, where a class can inherit properties of more than one parent class. The problem
occurs when there exist methods with the same signature in both the superclasses and subclass. On calling the method, the compiler cannot
determine which class method to be called and even on calling which class method gets the priority.
Note: Java doesn’t support Multiple Inheritance
What is Polymorphism in Java?
Polymorphism is considered one of the important features of Object-Oriented Programming. Polymorphism allows us to perform a single action in
different ways. In other words, polymorphism allows you to define one interface and have multiple implementations. The word “poly” means many
and “morphs” means forms, So it means many forms.
Types of Java polymorphism
In Java polymorphism is mainly divided into two types:
•Compile-time Polymorphism
•Runtime Polymorphism
Compile-Time Polymorphism
It is also known as static polymorphism. This type of polymorphism is achieved by function overloading or operator overloading.
Note: But Java doesn’t support the Operator Overloading.
Encapsulation in Java
Encapsulation is a fundamental concept in object-oriented programming
(OOP) that refers to the bundling of data and methods that operate on that
data within a single unit, which is called a class in Java. Encapsulation is a
way of hiding the implementation details of a class from outside access and
only exposing a public interface that can be used to interact with the class.
In Java, encapsulation is achieved by declaring the instance variables of a
class as private, which means they can only be accessed within the class. To
allow outside access to the instance variables, public methods called
getters and setters are defined, which are used to retrieve and modify the
values of the instance variables, respectively. By using getters and setters,
the class can enforce its own data validation rules and ensure that its
internal state remains consistent.
DATA ABSTRACTION
• Data Abstraction may also be defined as the process of
identifying only the required characteristics of an object
ignoring the irrelevant details. The properties and behaviors of
an object differentiate it from other objects of similar type and
also help in classifying/grouping the objects.
•
An abstract class is a class that is declared with an abstract keyword.
• An abstract method is a method that is declared without
implementation.
• An abstract class may or may not have all abstract methods. Some of
them can be concrete methods
•
• THANK YOU

More Related Content

PPTX
Nitish Chaulagai Java1.pptx
PDF
Java Interview Questions
PDF
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
DOCX
100 Java questions FOR LOGIC BUILDING SOFTWARE.docx
PPTX
UNIT - 1 Java Fundamentals, Basics of java
PPTX
Introduction to OOP concepts
PPTX
Introduction to oop and java fundamentals
PPTX
Unit II Inheritance ,Interface and Packages.pptx
Nitish Chaulagai Java1.pptx
Java Interview Questions
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
100 Java questions FOR LOGIC BUILDING SOFTWARE.docx
UNIT - 1 Java Fundamentals, Basics of java
Introduction to OOP concepts
Introduction to oop and java fundamentals
Unit II Inheritance ,Interface and Packages.pptx

Similar to Presentation2.ppt java basic core ppt . (20)

DOCX
Java Interview Questions For Freshers
DOCX
PDF
Top 100 Java Interview Questions with Detailed Answers
PPTX
PPT Lecture-1.4.pptx
PDF
Class in Java, Declaring a Class, Declaring a Member in a Class.pdf
PPTX
Object oriented programming CLASSES-AND-OBJECTS.pptx
PDF
Java Faqs useful for freshers and experienced
PDF
Top 371 java fa qs useful for freshers and experienced
PPT
Java_notes.ppt
PPTX
U1 JAVA.pptx
PPTX
oop unit1.pptx
DOCX
Viva file
PDF
Core Java Introduction | Basics
PPSX
Core java lessons
PDF
Java unit 7
PDF
Object-Oriented Programming in Java.pdf
PPTX
DOCX
Java interview questions and answers for cognizant By Data Council Pune
PDF
Classes and Object Concept Object Oriented Programming in Java
PPTX
Untitled presentation about object oriented.pptx
Java Interview Questions For Freshers
Top 100 Java Interview Questions with Detailed Answers
PPT Lecture-1.4.pptx
Class in Java, Declaring a Class, Declaring a Member in a Class.pdf
Object oriented programming CLASSES-AND-OBJECTS.pptx
Java Faqs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experienced
Java_notes.ppt
U1 JAVA.pptx
oop unit1.pptx
Viva file
Core Java Introduction | Basics
Core java lessons
Java unit 7
Object-Oriented Programming in Java.pdf
Java interview questions and answers for cognizant By Data Council Pune
Classes and Object Concept Object Oriented Programming in Java
Untitled presentation about object oriented.pptx
Ad

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Lesson notes of climatology university.
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
GDM (1) (1).pptx small presentation for students
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
master seminar digital applications in india
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Classroom Observation Tools for Teachers
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
VCE English Exam - Section C Student Revision Booklet
Lesson notes of climatology university.
PPH.pptx obstetrics and gynecology in nursing
GDM (1) (1).pptx small presentation for students
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
TR - Agricultural Crops Production NC III.pdf
Basic Mud Logging Guide for educational purpose
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
master seminar digital applications in india
Renaissance Architecture: A Journey from Faith to Humanism
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Abdominal Access Techniques with Prof. Dr. R K Mishra
Anesthesia in Laparoscopic Surgery in India
Microbial disease of the cardiovascular and lymphatic systems
Classroom Observation Tools for Teachers
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Module 4: Burden of Disease Tutorial Slides S2 2025
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Ad

Presentation2.ppt java basic core ppt .

  • 2. INTRODUCTION TO JAVA • Java is a most popular, object-oriented, widely used programming language and platform that is utilized for Android development, web development, artificial intelligence, cloud applications, and much more. So, mastering this gives you great opportunities in bigger organizations. • Java was originally developed by James Gosling at Sun Microsystems. It was released in May 1995 as a core component of Sun Microsystems' Java platform
  • 3. FIRST PROGRAM OF JAVA // A Java program to print "Hello World" public class KESHAV { public static void main(String args[]) { System.out.println("Hello World"); } } Output : Hello World
  • 6. • 1) SIMPLE: Java is simple to learn the concept of object oriented programming. • 2)Object Oriented:This reason makes java popular among developers. Oop includes concepts of object and classes and many more.
  • 7. JAVA USES • GUI applications • Web servers and applications servers • Middleware applications • Web applications • Mobile applications • Embedded systems • Enterprise applications • It is used for developing Android Apps • Helps you to create Enterprise Software • Wide range of Mobile java Applications • Scientific Computing Applications • Use for Big Data Analytics • Java Programming of Hardware devices • Used for Server-Side Technologies like Apache, JBoss, GlassFish, etc.
  • 8. COMPONENTS OF JAVA • 1 ) JAVA DEVELOPMENT KIT ( JDK ) • 2) JAVA VIRTUAL MACHINE ( JVM ) • 3) JAVA RUNTIME ENVIRONMENT ( JRE )
  • 9. OPERATORS IN JAVA 1.Arithmetic Operators : 2.Unary Operators : 3.Assignment Operator : 4.Relational Operators 5.Logical Operators 6.Ternary Operator 7.Bitwise Operators 8.Shift Operators
  • 11. • What are Strings in Java? • Strings are the type of objects that can store the character of values. A string acts the same as an array of characters in Java.
  • 12. ARRAYS IN JAVA • Array in java is a group of like-typed variables referred to by a common name. Arrays in Java work differently than they do in C/C++. Following are some important points about Java arrays. • In Java, all arrays are dynamically allocated. (discussed below) • Arrays are stored in contiguous memory [consecutive memory locations]. • Since arrays are objects in Java, we can find their length using the object property length. This is different from C/C++, where we find length using sizeof. • A Java array variable can also be declared like other variables with [] after the data type. • The variables in the array are ordered, and each has an index beginning with 0. • Java array can also be used as a static field, a local variable, or a method parameter. • The size of an array must be specified by int or short value and not long. • The direct superclass of an array type is Object. • Every array type implements the interfaces Cloneable and java.io.Serializable. • This storage of arrays helps us randomly access the elements of an array [Support Random Access]. • The size of the array cannot be altered(once initialized). However, an array reference can be made to point to another array. The general form of a one-dimensional array declaration is type var-name[]; OR type[] var-name;
  • 13. KEYWORDS IN JAVA • Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as variable names or objects.
  • 14. JAVA CLASSES • Java Classes • A class in Java is a set of objects which shares common characteristics/ behavior and common properties/ attributes. It is a user-defined blueprint or prototype from which objects are created. For example, Student is a class while a particular student named Ravi is an object. • Properties of Java Classes 1. Class is not a real-world entity. It is just a template or blueprint or prototype from which objects are created. 2. Class does not occupy memory. 3. Class is a group of variables of different data types and a group of methods. 4. A Class in Java can contain: 1. Data member 2. Method 3. Constructor 4. Nested Class 5. Interface
  • 15. Types of Access Modifiers in Java There are four types of access modifiers available in Java: 1.Default – No keyword required 2.Private 3.Protected 4.Public
  • 16. 1. Default Access Modifier When no access modifier is specified for a class, method, or data member – It is said to be having the default access modifier by default. The data members, classes, or methods that are not declared using any access modifiers i.e. having default access modifiers are accessible only within the same package. 2. Private Access Modifier The private access modifier is specified using the keyword private. The methods or data members declared as private are accessible only within the class in which they are declared. •Any other class of the same package will not be able to access these members. •Top-level classes or interfaces can not be declared as private because • private means “only visible within the enclosing class”. • protected means “only visible within the enclosing class and any subclasses 3. Protected Access Modifier The protected access modifier is specified using the keyword protected. The methods or data members declared as protected are accessible within the same package or subclasses in different packages
  • 18. Constructors in Java are used to initialize the values of the attributes of the object serving the goal to bring Java closer to the real world. We already have a default constructor that is called automatically if no constructor is found in the code. But if we make any constructor say parameterized constructor in order to initialize some attributes then it must write down the default constructor because it now will be no more automatically called. Multiple Inheritance is a feature of an object-oriented concept, where a class can inherit properties of more than one parent class. The problem occurs when there exist methods with the same signature in both the superclasses and subclass. On calling the method, the compiler cannot determine which class method to be called and even on calling which class method gets the priority. Note: Java doesn’t support Multiple Inheritance
  • 19. What is Polymorphism in Java? Polymorphism is considered one of the important features of Object-Oriented Programming. Polymorphism allows us to perform a single action in different ways. In other words, polymorphism allows you to define one interface and have multiple implementations. The word “poly” means many and “morphs” means forms, So it means many forms. Types of Java polymorphism In Java polymorphism is mainly divided into two types: •Compile-time Polymorphism •Runtime Polymorphism Compile-Time Polymorphism It is also known as static polymorphism. This type of polymorphism is achieved by function overloading or operator overloading. Note: But Java doesn’t support the Operator Overloading.
  • 20. Encapsulation in Java Encapsulation is a fundamental concept in object-oriented programming (OOP) that refers to the bundling of data and methods that operate on that data within a single unit, which is called a class in Java. Encapsulation is a way of hiding the implementation details of a class from outside access and only exposing a public interface that can be used to interact with the class. In Java, encapsulation is achieved by declaring the instance variables of a class as private, which means they can only be accessed within the class. To allow outside access to the instance variables, public methods called getters and setters are defined, which are used to retrieve and modify the values of the instance variables, respectively. By using getters and setters, the class can enforce its own data validation rules and ensure that its internal state remains consistent.
  • 21. DATA ABSTRACTION • Data Abstraction may also be defined as the process of identifying only the required characteristics of an object ignoring the irrelevant details. The properties and behaviors of an object differentiate it from other objects of similar type and also help in classifying/grouping the objects. • An abstract class is a class that is declared with an abstract keyword. • An abstract method is a method that is declared without implementation. • An abstract class may or may not have all abstract methods. Some of them can be concrete methods