SlideShare uma empresa Scribd logo
1 de 24
www.traininginbangalore.com
CORE JAVA
Core Java Syllabus
A First Look
A Simple Java Class
Java’s “Hello World” Program
Java Basics
Language and Platform Features
Program Life Cycle
The Java SE Development Kit (JDK)
Class and Object Basics
The Object Model and Object-Oriented Programming
Classes, References, and Instantiation
Adding Data to a Class Definition
Adding Methods (Behavior)
More on Classes and Objects
Accessing data, the “this” variable
Encapsulation and Access Control, public and private
Access
Constructors and Initialization
static Members of a Class
Scopes, Blocks, References to Objects
Flow of Control[briefly due to attendee
experience]
Branching: if, if-else, switch
Iteration: while, do-while, for, break, continue
Strings and Arrays
String, StringBuffer, StringBuilder
Arrays, Primitive Arrays, Arrays of Reference Types
varargs
Packages
Package Overview – Using Packages to Organize Code
import statements
Creating Packages, package Statement, Required
Directory Structure
Finding Classes, Packages and Classpath
Composition and Inheritance
Using Composition to Deal With Complexity
Composition/HAS-A, Delegation
Using Inheritance and Polymorphism to share commonality
IS-A, extends, Inheriting Features, Overriding Methods,
Using Polymorphism
Class Object
Abstract Classes
Advanced Stream Techniques
Buffering
Data Streams
Push-Back Parsing
Byte-Array Streams and String Readers and Writers
Java Serialization
The Challenge of Object Serialization
Serialization API, Serializable Interface
ObjectInputStream and ObjectOutputStream
The Serialization Engine
Transient Fields
readObject and writeObject
Externalizable Interface
Interfaces
Using Interfaces to Define Types
Interfaces and Abstract Classes
Exceptions
Exceptions and the Exception Hierarchy
try and catch
Handling Exceptions
Program Flow with Exceptions
Finally
Java Collections and Generics
The Collections Framework and its API
Collections and Java Generics
Collection, Set, List, Map, Iterator
Autoboxing
Collections of Object (non-generic)
Using ArrayList, HashSet, and HashMap
for-each Loop
Processing Items With an Iterator
More About Generics
The Java Streams Model
Delegation-Based Stream Model
InputStream and OutputStream
Media-Based Streams
Filtering Streams
Readers and Writers
Working with Files
File Class
Modeling Files and Directories
File Streams
Random-Access Files
Comments are almost like C++
• The javadoc program generates HTML API
documentation from the “javadoc” style comments in
your code.
/* This kind comment can span multiple lines */
// This kind is of to the end of the line
/* This kind of comment is a special
* ‘javadoc’ style comment
*/
JAVA Classes
• The class is the fundamental concept in JAVA (and other
OOPLs)
A class describes some data object(s), and the
operations (or methods) that can be applied to those
objects
Every object and method in Java belongs to a class
Classes have data (fields) and code (methods) and
classes (member classes or inner classes)
Static methods and fields belong to the class itself Others
belong to instances
•
•
•
•
•
An example of a class
class Person {
String name;
int age;
Variable
Method
void birthday ( )
{
age++;
System.out.println (name + '
is now ' + age);
}
}
Scoping
As in C/C++, scope is determined by the placement of curly braces {}.
A variable defined within a scope is available only to the end of that scope.
{ int x = 12;
/* only x available */
{ int q = 96;
/* both x and q available */
}
/* only x available */
/* q “out of scope” */
}
{ int x = 12;
{ int x = 96; /* illegal */
}
}
This is ok in C/C++ but not in Java.
Scope of Objects
• Java objects don’t have the same lifetimes as
primitives.
• When you create a Java object using new, it
hangs around past the end of the scope.
• Here, the scope of name s is delimited by the {}s
but the String object hangs around until GC’d
{
String s = new String("a string");
} /* end of scope */
The static
keyword•
•
•
Java methods and variables can be declared static
These exist independent of any object
This means that a Class’s
–static methods can be called even if no objects of that
class have been created and
–static data is “shared” by all instances (i.e., one rvalue
per class instead of one per instance
class StaticTest {static int i = 47;} StaticTest st1 = new StaticTest();
StaticTest st2 = new StaticTest();
// st1.i == st2.I == 47
StaticTest.i++; st2.I+
+
// st1.i == st2.I == 48
// or st1.I++ or
Example
public class Circle {
// A class field
public static final double
PI= 3.14159; constant
// A class method: just
compute a value
// A useful
based on thearguments
public static double
radiansToDegrees(double rads) { return rads *
180 / PI;
}// An instance field
public double r;
circle
// Two methodswhich
an object
// The radius of the
operate on
{
the instance
// Compute
fields of
the area of
public double
the circle
return PI *
area()
r * r;}
public
double
circumference() { // Compute the
circumference of the circle
return 2 * PI * r;
}
}
Array Operations
• Subscripts always start at 0 as in C
• Subscript checking is done automatically
• Certain operations are defined on arrays
of objects, as for other classes
– e.g. myArray.length == 5
An array is an object
NSIT ,Jetalpur
• Person mary = new Person ( );
• int
• int
myArray[
myArray[
] = new
] = {1, 4, 9,
16,
int[5];
25};
• String languages [ ] = {"Prolog", "Java"};
•
•
Since arrays are objects they are allocated dynamically
Arrays, like all objects, are subject to garbage collection
when no more references remain
– so fewer memory leaks
– Java doesn’t have pointers!
Example
Programs
Echo.java
•
•
•
•
•
•
•
•
•
C:UMBC331java>type echo.java
// This is the Echo example from the Sun
tutorial class echo {
public static void main(String args[]) { for (int i=0;
i < args.length; i++) { System.out.println( args[i] );
}
}
}
• C:UMBC331java>javac echo.java
•
•
•
•
•
C:UMBC331java>java echo this is pretty silly
this
is pretty
silly
Factorial Example
/* This program computes the factorial of a number
*/
public class Factorial {
public static void
main(String[] args) { here
int input =
Integer.parseInt(args[0]); input
double result =
factorial(input); factorial
System.out.println(result); result
}
ends here
// Define a class
// The program
starts
// Get the user's
// Compute the
// Print out the
// The main() method
public static double
computes x!
if (x <
0) return 0.0;
double fact =
1.0; initial value
factorial(int x) { // This method
// Check for bad input
// if bad,
return 0
// Begin with an
while(x > 1)
{ fact = fact *
x;
each time
// Loop until
// multiply
x equals
by x
// and then
Constructors
• Classes should define one or more methods to create
or construct instances of the class
• Their name is the same as the class name
– note deviation from convention that methods begin with
lower case
• Constructors are differentiated by the number and
types of their arguments
– An example of overloading
• If you don’t define a constructor, a default one will be
created.
• Constructors automatically invoke the zero argument
constructor of their superclass when they begin (note
that this yields a recursive process!)
Methods, arguments and
return values
Java methods are like C/C++ functions.
General case:
returnType methodName ( arg1, arg2, … argN)
{
methodBody
}
•
The return keyword exits a method optionally with a value
int storage(String s) {return s.length() * 2;}
boolean flag() { return true; }
float naturalLogBase() { return
2.718f; } void nothing() {
return; }
void nothing2() {}
CORE JAVA SYLLABUS

Mais conteúdo relacionado

Mais procurados

Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteTushar B Kute
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword pptVinod Kumar
 
Week9 Intro to classes and objects in Java
Week9 Intro to classes and objects in JavaWeek9 Intro to classes and objects in Java
Week9 Intro to classes and objects in Javakjkleindorfer
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in JavaSpotle.ai
 
Object and Classes in Java
Object and Classes in JavaObject and Classes in Java
Object and Classes in Javabackdoor
 
Java: Objects and Object References
Java: Objects and Object ReferencesJava: Objects and Object References
Java: Objects and Object ReferencesTareq Hasan
 
Classes and objects
Classes and objectsClasses and objects
Classes and objectsAnil Kumar
 
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Sagar Verma
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaCPD INDIA
 
Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3Sagar Verma
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...Sagar Verma
 
Object oriented programming in java
Object oriented programming in javaObject oriented programming in java
Object oriented programming in javaElizabeth alexander
 
Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2Sagar Verma
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Javabackdoor
 

Mais procurados (20)

Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword ppt
 
Class or Object
Class or ObjectClass or Object
Class or Object
 
Week9 Intro to classes and objects in Java
Week9 Intro to classes and objects in JavaWeek9 Intro to classes and objects in Java
Week9 Intro to classes and objects in Java
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Object and Classes in Java
Object and Classes in JavaObject and Classes in Java
Object and Classes in Java
 
Java: Objects and Object References
Java: Objects and Object ReferencesJava: Objects and Object References
Java: Objects and Object References
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Classes&amp;objects
Classes&amp;objectsClasses&amp;objects
Classes&amp;objects
 
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
 
Unit3 part2-inheritance
Unit3 part2-inheritanceUnit3 part2-inheritance
Unit3 part2-inheritance
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
 
Java chapter 5
Java chapter 5Java chapter 5
Java chapter 5
 
Unit3 part1-class
Unit3 part1-classUnit3 part1-class
Unit3 part1-class
 
Object oriented programming in java
Object oriented programming in javaObject oriented programming in java
Object oriented programming in java
 
Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 

Semelhante a CORE JAVA SYLLABUS

Semelhante a CORE JAVA SYLLABUS (20)

Core java
Core javaCore java
Core java
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Java02
Java02Java02
Java02
 
Core Java
Core JavaCore Java
Core Java
 
Core java concepts
Core java concepts Core java concepts
Core java concepts
 
Java assignment help
Java assignment helpJava assignment help
Java assignment help
 
Core Java Concepts
Core Java ConceptsCore Java Concepts
Core Java Concepts
 
Java Concepts
Java ConceptsJava Concepts
Java Concepts
 
Java basic
Java basicJava basic
Java basic
 
Java basic tutorial
Java basic tutorialJava basic tutorial
Java basic tutorial
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Android Training (Java Review)
Android Training (Java Review)Android Training (Java Review)
Android Training (Java Review)
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Core java concepts
Core    java  conceptsCore    java  concepts
Core java concepts
 
inheritance.pptx
inheritance.pptxinheritance.pptx
inheritance.pptx
 
Core java concepts
Core java conceptsCore java concepts
Core java concepts
 
Core java concepts
Core    java  conceptsCore    java  concepts
Core java concepts
 
Java
JavaJava
Java
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
UNIT - IIInew.pptx
UNIT - IIInew.pptxUNIT - IIInew.pptx
UNIT - IIInew.pptx
 

Mais de rajkamaltibacademy

Informatica Training Tutorial
Informatica Training Tutorial Informatica Training Tutorial
Informatica Training Tutorial rajkamaltibacademy
 
AWS Training Tutorial for Freshers
AWS Training Tutorial for FreshersAWS Training Tutorial for Freshers
AWS Training Tutorial for Freshersrajkamaltibacademy
 
CCNA Training Tutorial in bangaore
CCNA Training Tutorial in bangaoreCCNA Training Tutorial in bangaore
CCNA Training Tutorial in bangaorerajkamaltibacademy
 
Django Training Tutorial in Bangalore
Django Training Tutorial in BangaloreDjango Training Tutorial in Bangalore
Django Training Tutorial in Bangalorerajkamaltibacademy
 
Python Training Tutorial for Frreshers
Python Training Tutorial for FrreshersPython Training Tutorial for Frreshers
Python Training Tutorial for Frreshersrajkamaltibacademy
 
Oracle Training Tutorial for Beginners
Oracle Training Tutorial for BeginnersOracle Training Tutorial for Beginners
Oracle Training Tutorial for Beginnersrajkamaltibacademy
 
Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalorerajkamaltibacademy
 
Angular Tutorial Freshers and Experienced
Angular Tutorial Freshers and ExperiencedAngular Tutorial Freshers and Experienced
Angular Tutorial Freshers and Experiencedrajkamaltibacademy
 
Teradata Tutorial for Beginners
Teradata Tutorial for BeginnersTeradata Tutorial for Beginners
Teradata Tutorial for Beginnersrajkamaltibacademy
 
R Programming Tutorial for Beginners - -TIB Academy
R Programming Tutorial for Beginners - -TIB AcademyR Programming Tutorial for Beginners - -TIB Academy
R Programming Tutorial for Beginners - -TIB Academyrajkamaltibacademy
 
Selenium tutorial to Beginners
Selenium tutorial to BeginnersSelenium tutorial to Beginners
Selenium tutorial to Beginnersrajkamaltibacademy
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginnersrajkamaltibacademy
 
Hadoop Training Tutorial for Freshers
Hadoop Training Tutorial for FreshersHadoop Training Tutorial for Freshers
Hadoop Training Tutorial for Freshersrajkamaltibacademy
 

Mais de rajkamaltibacademy (16)

Informatica Training Tutorial
Informatica Training Tutorial Informatica Training Tutorial
Informatica Training Tutorial
 
AWS Training Tutorial for Freshers
AWS Training Tutorial for FreshersAWS Training Tutorial for Freshers
AWS Training Tutorial for Freshers
 
.Net Training Tutorial
.Net Training Tutorial.Net Training Tutorial
.Net Training Tutorial
 
CCNA Training Tutorial in bangaore
CCNA Training Tutorial in bangaoreCCNA Training Tutorial in bangaore
CCNA Training Tutorial in bangaore
 
Django Training Tutorial in Bangalore
Django Training Tutorial in BangaloreDjango Training Tutorial in Bangalore
Django Training Tutorial in Bangalore
 
Python Training Tutorial for Frreshers
Python Training Tutorial for FrreshersPython Training Tutorial for Frreshers
Python Training Tutorial for Frreshers
 
Oracle Training Tutorial for Beginners
Oracle Training Tutorial for BeginnersOracle Training Tutorial for Beginners
Oracle Training Tutorial for Beginners
 
Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalore
 
Angular Tutorial Freshers and Experienced
Angular Tutorial Freshers and ExperiencedAngular Tutorial Freshers and Experienced
Angular Tutorial Freshers and Experienced
 
Python Tutorial for Beginner
Python Tutorial for BeginnerPython Tutorial for Beginner
Python Tutorial for Beginner
 
Teradata Tutorial for Beginners
Teradata Tutorial for BeginnersTeradata Tutorial for Beginners
Teradata Tutorial for Beginners
 
R Programming Tutorial for Beginners - -TIB Academy
R Programming Tutorial for Beginners - -TIB AcademyR Programming Tutorial for Beginners - -TIB Academy
R Programming Tutorial for Beginners - -TIB Academy
 
Selenium tutorial to Beginners
Selenium tutorial to BeginnersSelenium tutorial to Beginners
Selenium tutorial to Beginners
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
 
Hadoop Training Tutorial for Freshers
Hadoop Training Tutorial for FreshersHadoop Training Tutorial for Freshers
Hadoop Training Tutorial for Freshers
 
Python Tutorial for Beginner
Python Tutorial for BeginnerPython Tutorial for Beginner
Python Tutorial for Beginner
 

Último

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Último (20)

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

CORE JAVA SYLLABUS

  • 2. Core Java Syllabus A First Look A Simple Java Class Java’s “Hello World” Program Java Basics Language and Platform Features Program Life Cycle The Java SE Development Kit (JDK)
  • 3. Class and Object Basics The Object Model and Object-Oriented Programming Classes, References, and Instantiation Adding Data to a Class Definition Adding Methods (Behavior) More on Classes and Objects Accessing data, the “this” variable Encapsulation and Access Control, public and private Access Constructors and Initialization static Members of a Class Scopes, Blocks, References to Objects
  • 4. Flow of Control[briefly due to attendee experience] Branching: if, if-else, switch Iteration: while, do-while, for, break, continue Strings and Arrays String, StringBuffer, StringBuilder Arrays, Primitive Arrays, Arrays of Reference Types varargs
  • 5. Packages Package Overview – Using Packages to Organize Code import statements Creating Packages, package Statement, Required Directory Structure Finding Classes, Packages and Classpath Composition and Inheritance Using Composition to Deal With Complexity Composition/HAS-A, Delegation Using Inheritance and Polymorphism to share commonality IS-A, extends, Inheriting Features, Overriding Methods, Using Polymorphism Class Object Abstract Classes
  • 6. Advanced Stream Techniques Buffering Data Streams Push-Back Parsing Byte-Array Streams and String Readers and Writers Java Serialization The Challenge of Object Serialization Serialization API, Serializable Interface ObjectInputStream and ObjectOutputStream The Serialization Engine Transient Fields readObject and writeObject Externalizable Interface
  • 7. Interfaces Using Interfaces to Define Types Interfaces and Abstract Classes Exceptions Exceptions and the Exception Hierarchy try and catch Handling Exceptions Program Flow with Exceptions Finally
  • 8. Java Collections and Generics The Collections Framework and its API Collections and Java Generics Collection, Set, List, Map, Iterator Autoboxing Collections of Object (non-generic) Using ArrayList, HashSet, and HashMap for-each Loop Processing Items With an Iterator More About Generics
  • 9. The Java Streams Model Delegation-Based Stream Model InputStream and OutputStream Media-Based Streams Filtering Streams Readers and Writers Working with Files File Class Modeling Files and Directories File Streams Random-Access Files
  • 10. Comments are almost like C++ • The javadoc program generates HTML API documentation from the “javadoc” style comments in your code. /* This kind comment can span multiple lines */ // This kind is of to the end of the line /* This kind of comment is a special * ‘javadoc’ style comment */
  • 11. JAVA Classes • The class is the fundamental concept in JAVA (and other OOPLs) A class describes some data object(s), and the operations (or methods) that can be applied to those objects Every object and method in Java belongs to a class Classes have data (fields) and code (methods) and classes (member classes or inner classes) Static methods and fields belong to the class itself Others belong to instances • • • • •
  • 12. An example of a class class Person { String name; int age; Variable Method void birthday ( ) { age++; System.out.println (name + ' is now ' + age); } }
  • 13. Scoping As in C/C++, scope is determined by the placement of curly braces {}. A variable defined within a scope is available only to the end of that scope. { int x = 12; /* only x available */ { int q = 96; /* both x and q available */ } /* only x available */ /* q “out of scope” */ } { int x = 12; { int x = 96; /* illegal */ } } This is ok in C/C++ but not in Java.
  • 14. Scope of Objects • Java objects don’t have the same lifetimes as primitives. • When you create a Java object using new, it hangs around past the end of the scope. • Here, the scope of name s is delimited by the {}s but the String object hangs around until GC’d { String s = new String("a string"); } /* end of scope */
  • 15. The static keyword• • • Java methods and variables can be declared static These exist independent of any object This means that a Class’s –static methods can be called even if no objects of that class have been created and –static data is “shared” by all instances (i.e., one rvalue per class instead of one per instance class StaticTest {static int i = 47;} StaticTest st1 = new StaticTest(); StaticTest st2 = new StaticTest(); // st1.i == st2.I == 47 StaticTest.i++; st2.I+ + // st1.i == st2.I == 48 // or st1.I++ or
  • 16. Example public class Circle { // A class field public static final double PI= 3.14159; constant // A class method: just compute a value // A useful based on thearguments public static double radiansToDegrees(double rads) { return rads * 180 / PI; }// An instance field public double r; circle // Two methodswhich an object // The radius of the operate on { the instance // Compute fields of the area of public double the circle return PI * area() r * r;} public double circumference() { // Compute the circumference of the circle return 2 * PI * r; } }
  • 17. Array Operations • Subscripts always start at 0 as in C • Subscript checking is done automatically • Certain operations are defined on arrays of objects, as for other classes – e.g. myArray.length == 5
  • 18. An array is an object NSIT ,Jetalpur • Person mary = new Person ( ); • int • int myArray[ myArray[ ] = new ] = {1, 4, 9, 16, int[5]; 25}; • String languages [ ] = {"Prolog", "Java"}; • • Since arrays are objects they are allocated dynamically Arrays, like all objects, are subject to garbage collection when no more references remain – so fewer memory leaks – Java doesn’t have pointers!
  • 20. Echo.java • • • • • • • • • C:UMBC331java>type echo.java // This is the Echo example from the Sun tutorial class echo { public static void main(String args[]) { for (int i=0; i < args.length; i++) { System.out.println( args[i] ); } } } • C:UMBC331java>javac echo.java • • • • • C:UMBC331java>java echo this is pretty silly this is pretty silly
  • 21. Factorial Example /* This program computes the factorial of a number */ public class Factorial { public static void main(String[] args) { here int input = Integer.parseInt(args[0]); input double result = factorial(input); factorial System.out.println(result); result } ends here // Define a class // The program starts // Get the user's // Compute the // Print out the // The main() method public static double computes x! if (x < 0) return 0.0; double fact = 1.0; initial value factorial(int x) { // This method // Check for bad input // if bad, return 0 // Begin with an while(x > 1) { fact = fact * x; each time // Loop until // multiply x equals by x // and then
  • 22. Constructors • Classes should define one or more methods to create or construct instances of the class • Their name is the same as the class name – note deviation from convention that methods begin with lower case • Constructors are differentiated by the number and types of their arguments – An example of overloading • If you don’t define a constructor, a default one will be created. • Constructors automatically invoke the zero argument constructor of their superclass when they begin (note that this yields a recursive process!)
  • 23. Methods, arguments and return values Java methods are like C/C++ functions. General case: returnType methodName ( arg1, arg2, … argN) { methodBody } • The return keyword exits a method optionally with a value int storage(String s) {return s.length() * 2;} boolean flag() { return true; } float naturalLogBase() { return 2.718f; } void nothing() { return; } void nothing2() {}