You are on page 1of 10

SYLLABUS

E
JAVA PROGRAMMING

STATEMENT
UNIT-I: BASICS,ESSENTIALS, CONTROL
|AND CLASSES & OBJECTS
Computer and its LanguagesStage, Origin and
Essentials: Program API
Features for Java JDK-0OP; Java
Variables& Literals-Data Types - String Class -Operators-
Keyboard
Comments
Type conversion -Constants Scope
-

Input; Control Statements: Conditional Statements-Looping


Classes and
Statements Break and Continue Statements;
-

Objects: Modifiers Arguments Constructors -Packages and


-

import-Static Class-Overloaded Methods and Constructors-


Returning Objects -
to String() this reference -Enumeration
-

- Garbage Collection.

Unit I : ARRAYS, INHERITANCE,INTERFACES AND


PACKAGES
Arrays Three or More Dimensions; Inheritance
Basics - Callingthe Super class Constructor Overriding Super
class Methods - Inheritance from Subclasses - Polymorphism
-Abstract Classes and Methods - Interfaces: Fields Multiple|
inheritance - Interface inheritance; Packages: Creating packag
-

Accessing package from other packages- Access Specifier.


Unit-Il: STRING HANDLING,EXCEPTION HANDLING
AND MULTI THREADING
String Handling: Basics -Operations-String Metho
- String Buffer class String Builder- to
String method -String|
-

Tokenizer class.
catch block Nested
Exception Basics: try and catch block- Mutu
- try throws keyword Throw vs Throws
-

- Final
-

Vs Finally Finalize Method


Vs
Overriding- Custom
Exception - Multithreading: Life Cycle - Methods in Thread -

thread application -

Thread priority - Synchronization Inter-


-

threadcommunication Suspending, Resuming, and Stopping


Threads
Unit - IV: APPLET AND GUI APPLICATION

Applets: Basis Lifecycle Applet classes -Application


- Graphics; AWT-I: GUI Programming AWT classes
-

Windows fundamentals- Creating Windows Dialog Boxes-


-

Layout Managers - Radio Buttons and Check Boxes Borders


-

Swing
Unit V: JAVA DATABASE CONNECTIVITY
Classes and
DBC - Types of Drivers- Architecture-
and
Interfaces Developing JDBC Application New Database
-

Table with JDBC Working with Database Metadata.


-
1.4 JavaProgrammi-
Assembly
level
result 1 +2; Compiler Assembler
program 11011010111010

Fig 1.3 Usage of Compiler

Some of the of High-Level Programming Languages are Ada


BASIC, C, C++, C#, COBOL, FORTRAN, Java, Pascal, Python, an
Visual Basic.
1.3 ORIGIN, STAGE OF JAVA
Java is general purpose object oriented programming language
a

James Gosling, Mike Sheridan, and Patrick


the Java language project in June 1991 at sun
Naughton initiate
team of sun engineers called Green Team.
Microsystems. The smal
Initially this language was called as "Greentalk", after
sometimes it was renamed as "Oak".
Oak "is nothing but, it is the national tree of
like USA, France. Oak is the many countries
symbol of strength.
In 1995, Oak was renamed as "JAVA".
Originally developed by James Gosling at Sun Microsystems
(which is now
a subsidiary, of Oracle Corporation) and released in
1995.
Originally Java was designed for small, embedded systems in
electronic appliances like
set-top boxes, interactive Television etc.,
In 1995, Time
Products of 1995.
magazine called Java one of the Ten Best
JDK 1.0 released
in(January 23, 1996)
1.3.1 Versions of Java
There are many java versions
that have been released.
1. JDK Alpha and Beta
(1995)
2. JDK 1.0 (23rd Jan,
1996)
3 JDK 1.1 (19th Feb, 1997).
Basics, Essentials, Control Statement and Classes &Objects 1.5
4. J2SE 1.2 (8th Dec, 1998)

5 J2SE 1.3 (8th May, 2000)


5.
6.
6. J2SE 1.4 (6th Feb, 2002)
7. J2SE 5.0 (30th Sep, 2004)
8. Java SE 6 (11th Dec, 2006)
9. Java SE 7 (28th July, 2011)
10. Java SE 8 (18th March, 2014)
11. Java SE 9 (21st Sep, 2017)

1.3.2 Features of JAVA


The following are thè important features ofJava.
1. Simple
2. Object Oriented
3. Compiled & Interpreted

4. Portable
5. Platfom independent
6. Secured

7. Robust
8. Dynamic
9. High Performance
10. Multi-threaded
11. Distributed
1. Simple

Java is a because its syntax was similar to c


simple language,
and ctt. Java removes some of the confusing concepts of C++ like
to statement
operator overloading, multiple Inheritance, pointers, go
etc.
1.6 Java Programmin
2. Object Oriented
Java is an object oriented language. Everything in Java is .
object. OOP concepts are implemented in Java programs.

3. Compiled & Interpreted


Java is both compiled & Interpreted language.
n case of C/C++, the source code is directly converted
binary code by the compiler that can be executed by the OS to0 g
output. This binary code generated on one OS does not execute o
other OS. That is, the binary code generated on UNLX machine m
be executed on UNIX only and similarly code generated on Window
must be executed on Windows only. For this reason, C/C+ are know
as "platform-dependent languages".

Java is a platform-independent language. This independenc


achieved by two phases:
i. Compilation
ii. Interpretation
i. Compilation

Converting Java source code to


bytecode is in knowa
as compilation. The bytecode is not in a readable format by thk
Microprocessor.
ii. Interpretation

Java interpreter
converts the
binary code. This phase is called as bytecode into processor readaoe
Interpretation.
JavaProgramm
1.10
DEVELOPMENT KIT (JDK)
1.4 JAVA consists.
JDK is a software development environment. JDK
to develop, compile, debug and run Ja
variety of programming tools
applications and applet programs.
Some of the basic tools are,
i. javac
ii. java
il. javadoc
iv. jdb
V. javah
vi. javap
vii. appletviewer
i. javac
The Java compiler, which is used to converts source codeim
byte code.

ii. java
The Java interpreter which runs Java applications and applet
by reading and interpreting byte code files.

ii. javadoc
It creates HTML format documentation from Java source cot
files.
iv. jdb
The Java debugger,
which is used to find errors in our progra
v. javah
It produces C header and stub generator. It was used to w>
native methods.
vi. javap

It is class file disassembler. It is used to convert odefi*

into a byte cou


program description.
1.11
Basics,Essentials, ControlStatement and Classes&Objects
vii. appletviewer

It runs applets outside of a web browser.


1.5 0OP (OBJECT ORIENTED PROGRAMMING)
Object Oriented programming is a programming style
which is associated with the concepts like class, object, Inheritance,
Encapsulation, Abstraction. Java follows the oop style ofprogramming.

Theimportant key conceptsof oop are, MJhod A muthod.


1. Object avo lock.of s1te
2. Class
n
Jova be
Thai h0A 24n 2d c
3. Inheritance x Rteo by callig fo
4. Polymorphism
5. Abstraction pl t
6. Encapsulation
7. Dynamic Binding
8. Message passing
1. Object
Objects are the "basic unif" ofany object oriented programming
language. Objects are said to be a "realtime entities", because an object
can be a person, a place, a book or anything)that the computer must

deal.
2. Class

Class is a grouping of variables and methods and its


one or

more associated objects. Class is said to be a "logical entity".


3. Inheritance

Jnheritance is the process of creating(a new class from the


Xisting class) New class inherits the properties and behavior of
existing class.
Inheritance provides reusability
worlo
Compule uenw my
Java Programmin
1.12
4. Polymorphism
calledpolymornhi.
One task is performedby different ways is rphisn
In java, we use method overloading and method overridino
ling te
achieve polymorphism.
5. Abstraction

Hiding internal details and shows only the essential features


known as abstraction.'

In Java, we use abstract class ana intertace to achieve


abstraction.

6. Encapsulation
Binding (or wrapping) code and data together into a single uni
is known as encapsulation.
In Java, we use class to achieve encapsulation.

7. DynamicBinding
Binding refers to the "linking of procedure call to the code" i
known as dynamic binding.

Dynamic binding means which code is to be executed is no


known until the time of the call at runtime.
8. Message passing
While the execution of
with each other by means of programs, objects may communicat
them.
sending and receiving messages between
student. result (regno);

Object
Information
Method
Communication operator
Basics, Esserntials, Control Statement and Classes &Objects 1.15
Developing and Running the Java application (stand alone)
programs

Java Program

Javac Compile

Java Class File

Java Run

ton m Output

The First Example Program in Java

class javademo

public static void main(String args[])


{
System.out.println("Welcome to the world of JAVA");

To save this program, class name must be same as the program name.

Save :javademo.java
Compile: javac javademo.java
Run java javademo
Java Programni
1.16
Output ***************

1.7 LITERALS & VARIABLES


"Literals" are constant values where as "variables are
named mnemory location to store the values.

Let us briefly discuss it.

1.7.1 Literals
Literal is nothing but any number, text, or other informatia
that represents a constant or fixed value. Java
literals. provides 5 types o
1. Integer Literals

2. Floating Point Literals


3. Character Literals
4. String Literals
5. Boolean Literals
1. Integer Literals

Integer literals consists of int,


three types. long, byte and short. They
a. Decimal literal

You might also like