SlideShare a Scribd company logo
SUGA Consulting Services
deepah.deepa@gmail.com
www.sugaconsulting.in
Office No.26, TNHB Complex,
180, Luz Church Road, Mylapore, Chennai – 600004
Mob No: 9840114766
Program Structure
SNo Topic Duration
1 Introduction to Java,OOPs Concepts 4 hrs
2 Primitive Data Types,Wrapper
Classes,String,String Buffer and String
Tokenizer,
4hrs
3 Util Package and IO Package 4hrs
4 Threads and Exception Handling 4hrs
5 Access Modifiers ,Methods
,Constructors,Coding Standards
4hrs
6 Database concepts, JDBC 4hrs
7 Log4j ,JDBC,Juint,UML 4hrs
8 Mini Project 4hrs
9 Mini Project 4hrs
10 Mini Project 4hrs
Java Basics
 It is an Opensource
 It is Platform Independent.
 Latest version is 1.8
 Mobile Applications, Robust Web Applications
OOPs Concepts
 Abstraction
 Encapsulation
 Polymorphism
 Inheritance
OOPs Concepts
 Abstraction
You can create an unimplemented method and use it in the
implemented/inherited class If a class is abstract and cannot be instantiated, the
class does not have much use unless it is subclass. This is typically how abstract
classes come about during the design phase. A parent class contains the common
functionality of a collection of child classes, but the parent class itself is too abstract
to be used on its own.
 Encapsulation
Encapsulation can be described as a protective barrier that prevents the code
and data being randomly accessed by other code defined outside the class. Access to
the data and code is tightly controlled by an interface
 Polymorphism
 Inheritance
OOPs Concepts
 Polymorphism
 Overloading
 Overloaded method
 Must change the argument list
 Can change the return type
 Can change the access modifier(Broader)
 Can declare new or broader checked exception
OOPs Concepts
 Polymorphism
 Overriding
 Overriding method can not have more restrictive access
modifier than the method being overriden but it can be less
 The argument list must exactly match that of the overriden method,
if they don’t it is more likely that you are overloading the method
 Return type must be the same as, or subtype of the return type
declared in overriden method in Super class
 Overriding method can throw any unchecked
exception(Runtime) but it can throw checked exception which is
broader or new than those declared by the overriden method but it
can not throw fewer or narrow checked exception
OOPs Concepts
 Inheritance
Java Inheritance defines an is-a relationship between a
superclass and its subclasses. This means that an object of a
subclass can be used wherever an object of the superclass can
be used. Class Inheritance in java mechanism is used to build
new classes from existing classes. The inheritance relationship
is transitive: if class x extends class y, then a class z, which
extends class x, will also inherit from class y.
Primitive Data Types, Wrapper
Classes
 Type of Primitives
 Char
 Boolean
 Byte
 Short
 Int
 Long
 Double
 Float
 Note*: In order to take the benefit of an object from primitives you need
to make use of Wrapper classes.
String, String Buffer A String is immutable, i.e. when it's created, it can never
change.
 A StringBuffer (or its non-synchronized
cousin StringBuilder) is used when you need to construct a
string piece by piece without the performance overhead of
constructing lots of little Strings along the way.
 The maximum length for both is Integer.MAX_VALUE,
because they are stored internally as arrays, and Java arrays
only have an int for their length pseudo-field.
 The performance improvement between Strings
and StringBuffers for multiple concatenation is quite
significant
Util Package
 Java.util package contains the collections framework,
legacy collection classes, event model, date and time
facilities, internationalization, and miscellaneous
utility classes.
 The important ones are :
HashMap
StringTokenizer
ArrayList
Date,Calendar
IO Package
 Java.io package provides classes for system input and
output through data streams, serialization and the file
system.
FileReader
FileWriter
BufferedReader
BufferedWriter
Exception Handling
 Checked exceptions: A checked exception is an exception that is
typically a user error or a problem that cannot be foreseen by the
programmer. For example, if a file is to be opened, but the file cannot
be found, an exception occurs. These exceptions cannot simply be
ignored at the time of compilation.
 Runtime exceptions: A runtime exception is an exception that occurs
that probably could have been avoided by the programmer. As opposed
to checked exceptions, runtime exceptions are ignored at the time of
compilation.
 Errors: These are not exceptions at all, but problems that arise beyond
the control of the user or the programmer. Errors are typically ignored
in your code because you can rarely do anything about an error. For
example, if a stack overflow occurs, an error will arise. They are also
ignored at the time of compilation.
Exception Handling
Access Modifier
 Access Control Modifiers:
 Java provides a number of access modifiers to set access levels for classes,
variables, methods and constructors. The four access levels are:
 Visible to the package, the default. No modifiers are needed.
 Visible to the class only (private).
 Visible to the world (public).
 Visible to the package and all subclasses (protected).
 Non Access Modifiers:
 Java provides a number of non-access modifiers to achieve many other
functionality.
 The static modifier for creating class methods and variables
 The final modifier for finalizing the implementations of classes, methods, and
variables.
 The abstract modifier for creating abstract classes and methods.
 The synchronized and volatile modifiers, which are used for threads.
Methods and Constructor
 The important difference between constructors and methods is
that constructors create and initialize objects that don't exist yet,
while methods perform operations on objects that already exist.
 Constructors can't be called directly; they are called implicitly
when the new keyword creates an object. Methods can be called
directly on an object that has already been created with new.
 The definitions of constructors and methods look similar in
code. They can take parameters, they can have modifiers
(e.g. public), and they have method bodies in braces.
 Constructors must be named with the same name as the class
name. They can't return anything, even void (the object itself is
the implicit return).
 Methods must be declared to return something, although it can
be void.
Coding Standards Case Sensitivity - Java is case sensitive, which means
identifier Hello and hello would have different meaning in Java.
 Class Names - For all class names the first letter should be in Upper Case.
If several words are used to form a name of the class, each inner word's first
letter should be in Upper Case.
Example class MyFirstJavaClass
 Method Names - All method names should start with a Lower Case letter.
If several words are used to form the name of the method, then each inner
word's first letter should be in Upper Case.
Example public void myMethodName()
 Program File Name - Name of the program file should exactly match the class
name.
Junit
JUnit is a unit testing framework for the Java
programming language. JUnit has been important in
the development of test-driven development, and is
one of a family of unit testing frameworks collectively
known as xUnit that originated with JUnit.
Junit
Thank You
SUGA Consulting Services
SUGA = Success Unlimited Guaranteed Always
www.sugaconsulting.in
ceo@sugaconsulting.in

More Related Content

What's hot

Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
Elizabeth alexander
 
Java interview questions 1
Java interview questions 1Java interview questions 1
Java interview questions 1
Sherihan Anver
 
Core Java interview questions-ppt
Core Java interview questions-pptCore Java interview questions-ppt
Core Java interview questions-ppt
Mayank Kumar
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
Jeba Moses
 
C#
C#C#
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
CPD INDIA
 
C# interview questions
C# interview questionsC# interview questions
C# interview questions
Chetan Chaudhari
 
C# interview quesions
C# interview quesionsC# interview quesions
C# interview quesions
Shashwat Shriparv
 
Complete java&j2ee
Complete java&j2eeComplete java&j2ee
Complete java&j2eeShiva Cse
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
Garuda Trainings
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
Sujit Majety
 
Oops in Java
Oops in JavaOops in Java
Oops in Java
malathip12
 
Object+oriented+programming+in+java
Object+oriented+programming+in+javaObject+oriented+programming+in+java
Object+oriented+programming+in+java
Ye Win
 
Core java by amit
Core java by amitCore java by amit
Core java by amit
Thakur Amit Tomer
 
java-06inheritance
java-06inheritancejava-06inheritance
java-06inheritanceArjun Shanka
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
Gradeup
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and Polymorphism
Eduardo Bergavera
 

What's hot (20)

Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 
Java interview questions 1
Java interview questions 1Java interview questions 1
Java interview questions 1
 
Core Java interview questions-ppt
Core Java interview questions-pptCore Java interview questions-ppt
Core Java interview questions-ppt
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
 
C#
C#C#
C#
 
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
 
C# interview questions
C# interview questionsC# interview questions
C# interview questions
 
C# interview quesions
C# interview quesionsC# interview quesions
C# interview quesions
 
Complete java&j2ee
Complete java&j2eeComplete java&j2ee
Complete java&j2ee
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
Oops in Java
Oops in JavaOops in Java
Oops in Java
 
Object+oriented+programming+in+java
Object+oriented+programming+in+javaObject+oriented+programming+in+java
Object+oriented+programming+in+java
 
Core java by amit
Core java by amitCore java by amit
Core java by amit
 
java-06inheritance
java-06inheritancejava-06inheritance
java-06inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and Polymorphism
 
Packages
PackagesPackages
Packages
 

Similar to Suga java training_with_footer

Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interview
Kuntal Bhowmick
 
Java Interview Questions For Freshers
Java Interview Questions For FreshersJava Interview Questions For Freshers
Java Interview Questions For Freshers
zynofustechnology
 
Top 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experiencedTop 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experiencedGaurav Maheshwari
 
Java Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedJava Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedyearninginjava
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
Kuntal Bhowmick
 
Viva file
Viva fileViva file
Viva file
anupamasingh87
 
Java mcq
Java mcqJava mcq
Java mcq
avinash9821
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
AnmolVerma363503
 
Basic syntax
Basic syntaxBasic syntax
Basic syntax
Ducat India
 
The smartpath information systems java
The smartpath information systems javaThe smartpath information systems java
The smartpath information systems java
The Smartpath Information Systems,Bhilai,Durg,Chhattisgarh.
 
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptxINDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
Indu65
 
Java_Interview Qns
Java_Interview QnsJava_Interview Qns
Java_Interview Qns
ManikandanRamanujam
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
ansariparveen06
 
50+ java interview questions
50+ java interview questions50+ java interview questions
50+ java interview questions
SynergisticMedia
 
Basics of java 2
Basics of java 2Basics of java 2
Basics of java 2Raghu nath
 
Android Training (Java Review)
Android Training (Java Review)Android Training (Java Review)
Android Training (Java Review)
Khaled Anaqwa
 

Similar to Suga java training_with_footer (20)

Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interview
 
Java Interview Questions For Freshers
Java Interview Questions For FreshersJava Interview Questions For Freshers
Java Interview Questions For Freshers
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Top 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experiencedTop 371 java fa qs useful for freshers and experienced
Top 371 java fa qs useful for freshers and experienced
 
Java Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedJava Faqs useful for freshers and experienced
Java Faqs useful for freshers and experienced
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 
Viva file
Viva fileViva file
Viva file
 
Java mcq
Java mcqJava mcq
Java mcq
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
 
Basic syntax
Basic syntaxBasic syntax
Basic syntax
 
The smartpath information systems java
The smartpath information systems javaThe smartpath information systems java
The smartpath information systems java
 
Unit 1 Java
Unit 1 JavaUnit 1 Java
Unit 1 Java
 
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptxINDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
 
Java_Interview Qns
Java_Interview QnsJava_Interview Qns
Java_Interview Qns
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
 
Unit 4
Unit 4Unit 4
Unit 4
 
50+ java interview questions
50+ java interview questions50+ java interview questions
50+ java interview questions
 
Basics of java 2
Basics of java 2Basics of java 2
Basics of java 2
 
Android Training (Java Review)
Android Training (Java Review)Android Training (Java Review)
Android Training (Java Review)
 

Suga java training_with_footer

  • 1. SUGA Consulting Services deepah.deepa@gmail.com www.sugaconsulting.in Office No.26, TNHB Complex, 180, Luz Church Road, Mylapore, Chennai – 600004 Mob No: 9840114766
  • 2. Program Structure SNo Topic Duration 1 Introduction to Java,OOPs Concepts 4 hrs 2 Primitive Data Types,Wrapper Classes,String,String Buffer and String Tokenizer, 4hrs 3 Util Package and IO Package 4hrs 4 Threads and Exception Handling 4hrs 5 Access Modifiers ,Methods ,Constructors,Coding Standards 4hrs 6 Database concepts, JDBC 4hrs 7 Log4j ,JDBC,Juint,UML 4hrs 8 Mini Project 4hrs 9 Mini Project 4hrs 10 Mini Project 4hrs
  • 3. Java Basics  It is an Opensource  It is Platform Independent.  Latest version is 1.8  Mobile Applications, Robust Web Applications
  • 4. OOPs Concepts  Abstraction  Encapsulation  Polymorphism  Inheritance
  • 5. OOPs Concepts  Abstraction You can create an unimplemented method and use it in the implemented/inherited class If a class is abstract and cannot be instantiated, the class does not have much use unless it is subclass. This is typically how abstract classes come about during the design phase. A parent class contains the common functionality of a collection of child classes, but the parent class itself is too abstract to be used on its own.  Encapsulation Encapsulation can be described as a protective barrier that prevents the code and data being randomly accessed by other code defined outside the class. Access to the data and code is tightly controlled by an interface  Polymorphism  Inheritance
  • 6. OOPs Concepts  Polymorphism  Overloading  Overloaded method  Must change the argument list  Can change the return type  Can change the access modifier(Broader)  Can declare new or broader checked exception
  • 7. OOPs Concepts  Polymorphism  Overriding  Overriding method can not have more restrictive access modifier than the method being overriden but it can be less  The argument list must exactly match that of the overriden method, if they don’t it is more likely that you are overloading the method  Return type must be the same as, or subtype of the return type declared in overriden method in Super class  Overriding method can throw any unchecked exception(Runtime) but it can throw checked exception which is broader or new than those declared by the overriden method but it can not throw fewer or narrow checked exception
  • 8. OOPs Concepts  Inheritance Java Inheritance defines an is-a relationship between a superclass and its subclasses. This means that an object of a subclass can be used wherever an object of the superclass can be used. Class Inheritance in java mechanism is used to build new classes from existing classes. The inheritance relationship is transitive: if class x extends class y, then a class z, which extends class x, will also inherit from class y.
  • 9. Primitive Data Types, Wrapper Classes  Type of Primitives  Char  Boolean  Byte  Short  Int  Long  Double  Float  Note*: In order to take the benefit of an object from primitives you need to make use of Wrapper classes.
  • 10. String, String Buffer A String is immutable, i.e. when it's created, it can never change.  A StringBuffer (or its non-synchronized cousin StringBuilder) is used when you need to construct a string piece by piece without the performance overhead of constructing lots of little Strings along the way.  The maximum length for both is Integer.MAX_VALUE, because they are stored internally as arrays, and Java arrays only have an int for their length pseudo-field.  The performance improvement between Strings and StringBuffers for multiple concatenation is quite significant
  • 11. Util Package  Java.util package contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes.  The important ones are : HashMap StringTokenizer ArrayList Date,Calendar
  • 12. IO Package  Java.io package provides classes for system input and output through data streams, serialization and the file system. FileReader FileWriter BufferedReader BufferedWriter
  • 13. Exception Handling  Checked exceptions: A checked exception is an exception that is typically a user error or a problem that cannot be foreseen by the programmer. For example, if a file is to be opened, but the file cannot be found, an exception occurs. These exceptions cannot simply be ignored at the time of compilation.  Runtime exceptions: A runtime exception is an exception that occurs that probably could have been avoided by the programmer. As opposed to checked exceptions, runtime exceptions are ignored at the time of compilation.  Errors: These are not exceptions at all, but problems that arise beyond the control of the user or the programmer. Errors are typically ignored in your code because you can rarely do anything about an error. For example, if a stack overflow occurs, an error will arise. They are also ignored at the time of compilation.
  • 15. Access Modifier  Access Control Modifiers:  Java provides a number of access modifiers to set access levels for classes, variables, methods and constructors. The four access levels are:  Visible to the package, the default. No modifiers are needed.  Visible to the class only (private).  Visible to the world (public).  Visible to the package and all subclasses (protected).  Non Access Modifiers:  Java provides a number of non-access modifiers to achieve many other functionality.  The static modifier for creating class methods and variables  The final modifier for finalizing the implementations of classes, methods, and variables.  The abstract modifier for creating abstract classes and methods.  The synchronized and volatile modifiers, which are used for threads.
  • 16. Methods and Constructor  The important difference between constructors and methods is that constructors create and initialize objects that don't exist yet, while methods perform operations on objects that already exist.  Constructors can't be called directly; they are called implicitly when the new keyword creates an object. Methods can be called directly on an object that has already been created with new.  The definitions of constructors and methods look similar in code. They can take parameters, they can have modifiers (e.g. public), and they have method bodies in braces.  Constructors must be named with the same name as the class name. They can't return anything, even void (the object itself is the implicit return).  Methods must be declared to return something, although it can be void.
  • 17. Coding Standards Case Sensitivity - Java is case sensitive, which means identifier Hello and hello would have different meaning in Java.  Class Names - For all class names the first letter should be in Upper Case. If several words are used to form a name of the class, each inner word's first letter should be in Upper Case. Example class MyFirstJavaClass  Method Names - All method names should start with a Lower Case letter. If several words are used to form the name of the method, then each inner word's first letter should be in Upper Case. Example public void myMethodName()  Program File Name - Name of the program file should exactly match the class name.
  • 18. Junit JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with JUnit.
  • 19. Junit
  • 20. Thank You SUGA Consulting Services SUGA = Success Unlimited Guaranteed Always www.sugaconsulting.in ceo@sugaconsulting.in