SlideShare a Scribd company logo
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

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

PPTX
Java Jive 002.pptx
AdarshSingh202130
 
PPT
Java_notes.ppt
tuyambazejeanclaude
 
PPTX
automatic dol starter
BANDARISANDEEP
 
PPT
Java Basics
Dhanunjai Bandlamudi
 
PPTX
Introduction to oop and java fundamentals
AnsgarMary
 
PDF
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
rtreduanur247
 
PPTX
Complete PPT about the Java lokesh kept it
lokeshpappaka10
 
PPTX
chapter 5 concepts of object oriented programming
WondimuBantihun1
 
PPTX
Automation Testing - Part 2 (Things to know in JAVA) - SLT
Ankit Prajapati
 
PPTX
Automation Testing - Part 2 (Things to know in JAVA) - SLT
Ankit Prajapati
 
ODP
Basic of Java
Ajeet Kumar Verma
 
PDF
Java introduction
Muthukumaran Subramanian
 
PPTX
Java Programming - UNIT - 1, Basics OOPS, Differences
PradeepT42
 
PPTX
Object Oriented Programming unit 1 content for students
ASHASITTeaching
 
PPTX
UNIT 3- Java- Inheritance, Multithreading.pptx
shilpar780389
 
PPT
Presentation to java
Ganesh Chittalwar
 
PPTX
Object oriented programming in java
Elizabeth alexander
 
PPTX
1_JavIntro
SARJERAO Sarju
 
PPTX
Android Training (Java Review)
Khaled Anaqwa
 
Java Jive 002.pptx
AdarshSingh202130
 
Java_notes.ppt
tuyambazejeanclaude
 
automatic dol starter
BANDARISANDEEP
 
Introduction to oop and java fundamentals
AnsgarMary
 
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
rtreduanur247
 
Complete PPT about the Java lokesh kept it
lokeshpappaka10
 
chapter 5 concepts of object oriented programming
WondimuBantihun1
 
Automation Testing - Part 2 (Things to know in JAVA) - SLT
Ankit Prajapati
 
Automation Testing - Part 2 (Things to know in JAVA) - SLT
Ankit Prajapati
 
Basic of Java
Ajeet Kumar Verma
 
Java introduction
Muthukumaran Subramanian
 
Java Programming - UNIT - 1, Basics OOPS, Differences
PradeepT42
 
Object Oriented Programming unit 1 content for students
ASHASITTeaching
 
UNIT 3- Java- Inheritance, Multithreading.pptx
shilpar780389
 
Presentation to java
Ganesh Chittalwar
 
Object oriented programming in java
Elizabeth alexander
 
1_JavIntro
SARJERAO Sarju
 
Android Training (Java Review)
Khaled Anaqwa
 

Recently uploaded (20)

PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
Controller Request and Response in Odoo18
Celine George
 
epi editorial commitee meeting presentation
MIPLM
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
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