SlideShare a Scribd company logo
1 of 12
Download to read offline
A Laboratory Manual for
Java Programming
Maharashtra State
Board of Technical Education, Mumbai
Third year Diploma in
Computer Engineering Group (CO,CM,IF)
CURRICULUM DEVELOPMENT CELL, MSBTE, MUMBAI.
LABORATORY MANUAL DEVELOPMENT PROJECT
© 2004,Maharashtra State Board of Technical Education,
49,Kherwadi, Aliyawar Jung Road, Bandra (East), Mumbai-400051,
Maharashtra State, India.
No part of this Laboratory Manual may be reproduced, in any form or by any
means, without permission in writing from MSBTE Mumbai.
Educational Consultant/ Dr. R.S. Mahashabde Dr. R.S. Mahashabde
Regional Project Technical Teachers’ Training Technical Teachers’ Training
Coordinator Institute, Extension Centre, Pune Institute, Extension Centre, Pune
Project Institution Cursow Wadia Inst. of Tech., Pune Sou. Venutai Chavan Polytechnic,
Pune
Project Period April 2002 – March 2003 July 2004 – Feb. 2005
Chief Project Coordinator Principal, Shri N. S. Paradkar Principal, Shri. J. K. Warke
Project Coordinator Shri. A. A. Jambhale, Shri. A. V. Kurkute,
H. O. D., Comp. Deptt., H. O. D., Computer Technology
CWIT., Pune Deptt., SVCP, Pune
Course Coordinator Shri. P. S. Desai, —
Lect. in Comp. Engg.,
CWIT., Pune
Subject Experts 1) Shri. A. A. Jambhale, 1) Shri. G.J. Adhegaonkar,
H. O. D., Comp. Deptt., Lect. in Comp. Tech.,
CWIT., Pune SVCP, Pune
2) Shri. P. S. Desai, 2) Shri. P.S. Desai,
Lect. in Comp. Engg., Lect. in Comp. Engg.,
CWIT., Pune CWIT, Pune
3) Shri. G. J. Adhegaonkar, 3) Shri. A. V. Kurkute,
Lect. in Computer Engg., H.O.D. Comp. Tech.,
SVCP, Pune SVCP, Pune
Subject Editor — —
Team for design Team for restructuringItem
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION
Certificate
This is to certify that, Mr. / Ms.
roll no. of Third Year Diploma in
has completed the term work satisfactorily in Java Programming (1526)
for the academic year 200 to 200 as prescribed in the
curriculum.
Place : Enrolment No.:
Date : Exam. Seat No.:
Subject Teacher Head of the Department Principal
Seal of
Institution
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 5
Java Programming
LEARNING OVERVIEW
Importance of the subject
Welcome to the amazing and dynamic world of Java! Java is a programming language that was
introduced by Sun Microsystems in June 1995. Java is most favoured language for web enabled
application development. It is widely used for developing distributed and internet based applications.
It is also used in communication programming. It is used for web oriented application development
due to its features such as platform independence and portability. Due to OOPS support it offers
new and powerful way to solve complex problems. It also has a huge collection of built in class
libraries which ease the programming task. It has the most coveted robustness and built in security
measures.Also the programs become clearer, reliable, and easily maintainable. It is widely accepted
and is a well designed programming language.
The students are expected to understand basic concepts of web enabled programming and be able
to develop Java programming skills.
The students are already familiar with object oriented principals through C++ programming, which
serves as a good foundation to learn Java.
Subject Objectives
Today’s programming paradigm involves web enabled and distributed applications. There is heavy
need of web enabled applications to cater to the needs of customers located around the globe.
Java is a major tool used for developing web based applications as it provides platform independence.
It is not only object oriented but also very robust and secure.
Therefore in Software industries Java is widely used and forms a major part of skill set expected
from aspiring software professionals.
Features of Java Language
Java is truly object oriented programming language mainly used for Internet applications. It can
also be used for standalone application development. Following are the main features of Java –
Compiled and Interpreted
Java is a two stage system because it combines two approaches which are compiled and interpreted.
First Java compiler translates source code into what is known as bytecode instructions. Byte codes are not
machine instructions and therefore in the second stage, Java interpreter generates machine code that can
be directly executed by the machine that is running the Java program. Thus the Java is both a compiled
and interpreted language.
Platform Independent and Portable
Java programs can be easily moved from one computer system to another, anywhere and anytime.
Changes in upgrades in operating systems, processors and system resources will not force any changes
in Java programs.
Java ensures portability in two ways. First, Java compiler generates bytecode instructions that can
be implemented on any machine. Secondly, the sizes of the data types are machine independent.
Object Oriented
Almost everything in Java is an object. All program code and data are placed within objects and
classes. Java comes with an extensive set of classes and classes, arranged in packages that we can use
in our programs by inheritance. This Java is a true object oriented language.
Robust and Secure
Java is a robust language. It provides many safeguards to give reliable code. It has strict compile
time and run time checking for data types. It is designed as garbage collected language, so no need to
worry about all memory management problems. Java also supports the concept of exception handling
which captures serious errors and eliminates any risk of crashing the system.
Security is the most important thing for a language i.e. used for programming on Internet. Threat of
viruses and misuse of resources is everywhere. Java systems not only verify all memory access but also
♦ i
6 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
Java Programming
ensure that no viruses are communicated with an applet. The absence of pointers in Java ensures that
programs cannot gain access to memory locations without proper authorization.
Distributed
Java is designed as a distributed language for creating applications on networks. It has the ability to
share both data and programs. Java applications can open and access remote objects on Internet as
easily as they can do in a local system. This enables multiple programmers at multiple remote locations to
work together on a single object.
Multithreaded and Interactive
Multithreaded means handling multiple tasks simultaneously. Java supports multithreaded programs.
This means that we need not wait for the application to finish one task before beginning another. For e.g.
we can listen to music while scrolling a page and at the same time download an applet from a distant
computer. This feature improves interactive performance of graphical applications.
High Performance
Java performance is high due to the use of intermediate bytecode. Java architecture is also designed
to reduce overheads during runtime. The use of multithreading also increases overall execution speed of
Java program.
Dynamic and Extensible
Java is a dynamic language. Java is capable of dynamically linking in new class libraries, methods
and objects.
Java programs support functions written in other languages such as C and C++. These functions
are known as native methods. The efficient functions available in these languages can be used. Native
methods are linked dynamically at run time.
Principles and Concepts
The Teacher will guide the students and give proper direction to learn following concepts & principles-
Platform independence through Java virtual machine, Distributed applications, Security over network,
Multithreaded applications, Understanding applet programming and event handling, Understanding
polymorphism, Handling error using exception handling, Inheritance and types of inheritance, Using
readymade classes in various packages, Accessing databases using Java open database
connectivity, Communication using sockets, Application of Java language features in programs.
Java Development Kit (JDK)
The JDK comes with a collection of tools that are used for developing and running Java programs
which include:
appletviewer (for viewing Java applets)
javac (Java compiler)
java (Java interpreter)
javap (Java disassembler)
javah (for C header files)
javadoc (for creating HTML documents)
jdb (Java debugger)
Following table lists these tools and their descriptions.
Tool Description
appletviewer Enables us to run Java applets (without using a Java compatible browser)
java Java Interpreter, which runs applets and applications by reading and interpreting byte
code files.
javac Java compiler, which translates Java source code to bytecode files that the interpreter
can understand.
javadoc Creates HTML format documentation from Java source code files.
javah Produces header files for use with native methods.
javap Java disassembler, which enables us to convert bytecode files into a program.
jdb Java debugger, which finds errors in programs.
ii ♦
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 7
Java Programming
The way these tools are applied to build and run application programs are shown below -
To create a Java program we need to create a source code file using a text editor. The source code
is compiled using javac and executed using Java interpreter java. The Java debugger jdb is used to find
errors. A compiled Java program can be converted into a source code using Java disassembler javap.
Java Virtual Machine (JVM)
All language compilers translate source code into machine code for a specific computer. Java
compiler produces an intermediate code known as bytecode for a machine that does not exist. This
machine is called as Java Virtual Machine and it exists only inside the computer memory. Following
figure shows the process of compiling a Java program into bytecode which is also called as Java
Virtual Machine code.
The Java Virtual Machine code is not machine specific. The machine specific code (known as
machine code) is generated by the Java interpreter by acting as an intermediate between the virtual
machine and the real machine as shown in following figure. The interpreter is different for different machines.
♦ iii
8 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
Java Programming
LINK / BLOCK DIAGRAM
SHOWING INTER RELATIONSHIP OF SUBJECT AREAS,
CURRICULUM OBJECTIVES & JOB PROFILE.
iv ♦
HUMAN SCIENCE
1. Communication
skills
2. Development of
Generic skills
ENGG. SCIENCE
1. Engineering
Mathematics
2. Electrical
Engineering
CORE TECHNOLOGY
1. Computer Fundamental &
Organization.
2. Programming in C
3. Digital Techniques
4. Microprocessor &
Programming.
5. Computer Networks
6. Object Oriented
Programming.
7. Database Management
System.
8. System Analysis & Design.
9. Computer Architecture &
Maintenance.
10.Peripherals, Testing &
Measuring Instruments.
(IT & CO)
11. Operating System.
12.Data Structure (CM)
13.Computer Peripherals &
Interfacing.
TECHNOLOGY SUBJECTS
1. Network Administration
(IT & LM)
2. Web Page Designing.
3. Web Server Application.
(CM)
4. Visual Basic Programming.
5. Java Programming.
6. N/W installation &
Maintenance (IT & CO).
7. Troubleshooting & Repair of
Computer System (CO).
8. Digital Computer Control (CO)
JOB PROFILE
1. Entrepreneur
2. Industry
• Customer Support
Engineer
• Technical Assistant
• Project Manager.
• System Analyst.
• Database Administrator.
• Software Developer.
• N/W Administrator.
• Web Page (Application)
• Developer.
• Hardware/Software
• Consultant.
• Customer Support.
CURRICULUM OBJECTIVES
1. Develop attitudes for
personal development.
2. Develop social skills for
social development.
3. Develop continued learning
skills for life long learning.
4. Develop Technical skills for
industry activity.
• Project management skills
• Plan, Estimate, Procure &
install hardware & software
systems
• Test & Certify software &
hardware
• Analyze & design software
systems
• Develop programming
skills
• Web server administration
skills
• Documentation skills
• Troubleshooting, repair &
maintenance of computer
system
• Installation, Maintenance &
Administration of hardware
• Manage computer
resources
• Develop marketing skills
BASIC SCIENCE
1. Applied Physics
2. Applied
Mathematics
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 9
Java Programming
GRAPHICAL STRUCTURE OF SUBJECT AREA
Third year- Computer Engineering
JAVA PROGRAMMING (1526)
♦ v
10 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
Java Programming
DEVELOPMENT OF SKILLS
Following intellectual skills will be developed through the subject of Java Programming -
Intellectual Skills Description
I1 Identify syntax for given program.
I2 Select control statement.
I3 Select built in classes and methods.
I4 Develop algorithm.
I5 Write program for given problem statement.
I6 Analyze for given problem statement.
Students will practice following motor skills-
Motor Skills Description
M1 Give proper indentation.
M2 Follow naming conventions.
GRID TABLE
Following table gives grid of the experiments and related intellectual and motor skills.
• Teacher shall ensure for development of generic skills during the practicals.
• Students are expected to focus on acquiring specific skills mentioned therein.
SN Experiment Title Intellectual skills Motor
skills
I1 I2 I3 I4 I5 I6 M1 M2
1 Introduction to Laboratory Work - -
2 Program to define a class and instantiate its object. - -
3 Program using String class. -
4 Program using wrapper class.
5 Program to define a class and create array of objects.
6 Program using Vector class.
7 Program to implement single inheritance. - -
8 Program to implement multiple inheritance using interface. - -
9 Program using user-defined exception. - -
10 Program to implement multithreading. - -
11 Program to implement synchronization. - -
12 Program using Applet. -
13 Program to design applet using AWT components. -
14 Program using Applet to handle events. -
15 Program for file processing.
16 Program to implement communication between client and server
sockets.
17 Program to access database using JDBC-ODBC.
18 Mini Project
NOTE : - Identified Skills
STRATEGY FOR IMPLEMENTATION
It is suggested that 40 to 50% experiments shall be completed in first term and remaining experiments
in the second term.
vi ♦
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 11
Java Programming
GUIDELINES FOR TEACHERS
Teachers shall discuss the following points with students before start of practicals of the subject.
1) Learning Overview: To Develop better understanding of importance of the subject. To Know related
skills to be developed such as intellectual skills and Motor Skills.
2) Link / Block Diagram : Context of the subject in the form of link diagram showing interrelationship
of various subject areas, curriculum objectives and job profile.
3) Graphical structure: In this topics and sub topics are organized in systematic way so that ultimate
purpose of learning the subject is achieved. This is arranged in the form of fact, concept, principle,
procedure, application and problem.
4) Know your Laboratory work : To understand the layout of laboratory, specifications of Equipment
/Instruments/ Materials, procedure, working in groups, planning time etc. Also to know total amount
of work to be done in the laboratory.
5) Teacher shall ensure that required equipment are in working condition before start of experiment,
also keep operating instruction manual available.
6) Explain prior concepts to the students before starting of each experiment.
7) Involve students activity at the time of conduct of each experiment.
8) While taking reading/observation each student (from batch of 20 students) shall be given a chance
to perform/observe the experiment.
9) List of questions is given at the end of each experiment. Teacher shall instruct the students to
attempt all questions given at the end each experiment / exercise. Teacher shall ensure that each
student writes the answers to the allotted questions in the laboratory manual after performance is
over.
10) If the experimental setup has variations in the specifications of the equipment, the teachers are
advised to make the necessary changes, wherever needed
11) Teacher shall assess the performance of students continuously as per norms prescribed by MSBTE.
12) Teacher should ensure that the respective skills and competencies are developed in the students
after the completion of the practical exercise.
13) Teacher is expected to share the skills and competencies to be developed in the students.
14) Teacher may provide additional knowledge and skills to the students even though not covered in
the manual but are expected from the students by the industries.
15) Teachers shall ensure that industrial visits recommended in the manual are covered.
16) Teacher may suggest the students to refer additional related literature of the technical papers /
reference books / Seminar Proceedings, etc.
17) During assessment teacher is expected to ask questions to the students to tap their achievements
regarding related knowledge and skills so that students can prepare while submitting record of the
practicals. Focus should be given on development of enlisted skills rather than theoretical/codified
knowledge.
18) Teacher should enlist the skills to be developed in the students that are expected by the industry.
19) Teacher should organised Group discussions / brain storming sessions/ Seminars to facilitate the
exchange of knowledge amongst the students.
20) Teacher should ensure that revised CIAAN-2004 norms are followed simultaneously and
progressively.
21) Teacher should give more focus on hands on skills and should actually share the same.
22) Teacher shall also refer to the Circular No. MSBTE/D-50/Lab Mannual / 2005 / 3183 dated 5th May,
2005 for additional guidelines.
♦ vii
12 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
Java Programming
INSTRUCTIONS FOR STUDENTS
Students shall read the points given below for understanding the theoretical concepts & practical
applications.
1) Listen carefully to the lecture given by teacher about importance of subject, curriculum philosophy,
graphical structure, skills to be developed, information about equipment, instruments, procedure,
method of continuous assessment, tentative plan of work in laboratory and total amount of work to
be done in a year.
2) Students shall undergo study visit of the laboratory for types of equipment, instruments, material to
be used, before performing experiments.
3) Read the write up of each experiment to be performed, a day in advance.
4) Organize the work in the group and make a record of all observations.
5) Understand the purpose of experiment and its practical implications.
6) Write the answers of the questions allotted by the teacher during practical hours if possible or
afterwards, but immediately.
7) Student should not hesitate to ask any difficulty faced during conduct of practical / exercise.
8) The student shall study all the questions given in the laboratory manual and practice to write the
answers to these questions
9) Student shall visit the recommended industries and should study the knowhow of the shop floor
practices and the operations of machines.
10) Student shall develop maintenance skills as expected by the industries.
10) Student should develop the habit of pocket discussion / group discussion related to the experiments
/ exercises so that exchanges of knowledge / skills could take place.
12) Student shall attempt to develop related hands-on-skills and gain confidence.
13) Student shall focus on development of skills rather than theoretical or codified knowledge.
14) Student shall visit the nearby workshops, workstation, industries, laboratories, technical exhibitions,
trade fair etc. even not included in the Lab Manual. In short, students should have exposure to the
area of work right in the student hood.
15) Student shall insist for the completion of recommended Laboratory Work, industrial visits, answers
to the given questions, etc.
16) Student shall develop the habit of evolving more ideas, innovations, skills etc. than included in the
scope of the manual.
17) Student shall refer technical magazines, proceedings of the Seminars, refer websites related to the
scope of the subjects and update their knowledge and skills.
18) Student should develop the habit of not to depend totally on teachers but to develop self learning
techniques.
19) Student should develop the habit to react with the teacher without hesitation with respect to the
academics involved.
20) Student should develop habit to submit the practicals exercise continuously and progressively on
the scheduled dates and should get the assessment done.
21) Student should be well prepared while submitting the write up of the exercise. This will develop the
continuity of the studies and he will not be over loaded at the end of the term.
viii ♦
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 13
Java Programming
1 Introduction to Laboratory Work 1
2 Program to define a class and instantiate 5
its object.
3 Program using String class. 11
4 Program using wrapper class. 17
5 Program to define a class and create 23
array of objects.
6 Program using Vector class. 29
7 Program to implement single inheritance. 37
8 Program to implement multiple 45
inheritance using interface.
9 Program using user-defined exception. 54
10 Program to implement multithreading. 60
11 Program to implement synchronization. 67
12 Program using Applet. 73
13 Program to design applet using AWT 80
components.
14 Program using Applet to handle events. 88
15 Program for file processing. 93
16 Program to implement communication 100
between client and server sockets.
17 Program to access database using 113
JDBC-ODBC.
18 Mini Project 122
Exp. Page Date of Date of Assess- Sign. of
No. Name of the Experiments No. Perfor- submi - ment teacher &
mance ssion Max. Remarks
Marks 15
List of Experiments & Record of Progressive Assessment
* To be transferred to proforma of CIAAN- 2004
Total
Marks
…………
Average
Marks
out of
15……*
♦ ix

More Related Content

What's hot

Industrial training presentation
Industrial training presentationIndustrial training presentation
Industrial training presentationRS Technova Pvt. Ltd.
 
Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.Ritesh Kumar Bhanu
 
Core Java Training report
Core Java Training reportCore Java Training report
Core Java Training reportSumit Kumar Sharma
 
6 Weeks Summer Training on Java By SSDN Technologies
6 Weeks Summer Training on Java By SSDN Technologies6 Weeks Summer Training on Java By SSDN Technologies
6 Weeks Summer Training on Java By SSDN TechnologiesDavid Son
 
Summer internship report
Summer internship reportSummer internship report
Summer internship reportIpsit Pradhan
 
Summer training report on java se6 technology
Summer training  report on java se6 technologySummer training  report on java se6 technology
Summer training report on java se6 technologyShamsher Ahmed
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavVaibhav Srivastav
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
Report in Java programming and SQL
Report in Java programming and SQLReport in Java programming and SQL
Report in Java programming and SQLvikram mahendra
 
Core java report
Core java reportCore java report
Core java reportSumit Jain
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaShravan Sanidhya
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core javaAisha Siddiqui
 
Best Industrial training report
Best Industrial training reportBest Industrial training report
Best Industrial training reportShivam Saxena
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training reportAnurag Gautam
 
130700548484460000
130700548484460000130700548484460000
130700548484460000Tanzeel Ahmad
 
summer training report on java
summer training report on java  summer training report on java
summer training report on java Shiva Bhatt
 
Training report anish
Training report anishTraining report anish
Training report anishAnish Yadav
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavVaibhav Srivastav
 

What's hot (20)

Industrial training presentation
Industrial training presentationIndustrial training presentation
Industrial training presentation
 
Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.
 
Core Java Training report
Core Java Training reportCore Java Training report
Core Java Training report
 
6 Weeks Summer Training on Java By SSDN Technologies
6 Weeks Summer Training on Java By SSDN Technologies6 Weeks Summer Training on Java By SSDN Technologies
6 Weeks Summer Training on Java By SSDN Technologies
 
Summer internship report
Summer internship reportSummer internship report
Summer internship report
 
String class
String classString class
String class
 
Summer training report on java se6 technology
Summer training  report on java se6 technologySummer training  report on java se6 technology
Summer training report on java se6 technology
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav Srivastav
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
Report in Java programming and SQL
Report in Java programming and SQLReport in Java programming and SQL
Report in Java programming and SQL
 
Training report
Training reportTraining report
Training report
 
Core java report
Core java reportCore java report
Core java report
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core java
 
Best Industrial training report
Best Industrial training reportBest Industrial training report
Best Industrial training report
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training report
 
130700548484460000
130700548484460000130700548484460000
130700548484460000
 
summer training report on java
summer training report on java  summer training report on java
summer training report on java
 
Training report anish
Training report anishTraining report anish
Training report anish
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav Srivastav
 

Similar to Java Lab Manual for Diploma Students

0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdfDeepakChaudhriAmbali
 
Java Course training in Hamirpur Himachal Pradesh
Java Course training in Hamirpur Himachal PradeshJava Course training in Hamirpur Himachal Pradesh
Java Course training in Hamirpur Himachal PradeshExcellence Technology
 
Demo Lecture 01 Notes.pptx by Sabki Kaksha
Demo Lecture 01 Notes.pptx by Sabki KakshaDemo Lecture 01 Notes.pptx by Sabki Kaksha
Demo Lecture 01 Notes.pptx by Sabki KakshaGandhiSarthak
 
Demo Lecture 01 Notes paid , course notes
Demo Lecture 01 Notes paid , course notesDemo Lecture 01 Notes paid , course notes
Demo Lecture 01 Notes paid , course notesGandhiSarthak
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harshaHarsha Batra
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docxvikasbagra9887
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programmingbusiness Corporate
 
Java tutorial for beginners | Java Features
Java tutorial for beginners | Java FeaturesJava tutorial for beginners | Java Features
Java tutorial for beginners | Java FeaturesSpeed4Career
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxSuganthiDPSGRKCW
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdfAdiseshaK
 
java course in chandigarh...
java    course     in      chandigarh...java    course     in      chandigarh...
java course in chandigarh...excellence acadmey
 
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGEA CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGENathan Mathis
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to JavaDevaKumari Vijay
 
Java and its features
Java and its featuresJava and its features
Java and its featuresPydi Nikhil
 
Java Programming Unveiling the Power of a Versatile Language.pdf
Java Programming Unveiling the Power of a Versatile Language.pdfJava Programming Unveiling the Power of a Versatile Language.pdf
Java Programming Unveiling the Power of a Versatile Language.pdfKajal Digital
 
Java presentation
Java presentationJava presentation
Java presentationKaran Sareen
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 
How to use Java in Web Application Development?
How to use Java in Web Application Development?How to use Java in Web Application Development?
How to use Java in Web Application Development?Inexture Solutions
 

Similar to Java Lab Manual for Diploma Students (20)

0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf0f0cef_1dac552af56c4338ab0672859199e693.pdf
0f0cef_1dac552af56c4338ab0672859199e693.pdf
 
Java Course training in Hamirpur Himachal Pradesh
Java Course training in Hamirpur Himachal PradeshJava Course training in Hamirpur Himachal Pradesh
Java Course training in Hamirpur Himachal Pradesh
 
Demo Lecture 01 Notes.pptx by Sabki Kaksha
Demo Lecture 01 Notes.pptx by Sabki KakshaDemo Lecture 01 Notes.pptx by Sabki Kaksha
Demo Lecture 01 Notes.pptx by Sabki Kaksha
 
Demo Lecture 01 Notes paid , course notes
Demo Lecture 01 Notes paid , course notesDemo Lecture 01 Notes paid , course notes
Demo Lecture 01 Notes paid , course notes
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
 
Java tutorial for beginners | Java Features
Java tutorial for beginners | Java FeaturesJava tutorial for beginners | Java Features
Java tutorial for beginners | Java Features
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java features
Java  features Java  features
Java features
 
java course in chandigarh...
java    course     in      chandigarh...java    course     in      chandigarh...
java course in chandigarh...
 
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGEA CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
Java Programming Unveiling the Power of a Versatile Language.pdf
Java Programming Unveiling the Power of a Versatile Language.pdfJava Programming Unveiling the Power of a Versatile Language.pdf
Java Programming Unveiling the Power of a Versatile Language.pdf
 
Java presentation
Java presentationJava presentation
Java presentation
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
How to use Java in Web Application Development?
How to use Java in Web Application Development?How to use Java in Web Application Development?
How to use Java in Web Application Development?
 

Recently uploaded

Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsHajira Mahmood
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptxBREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptxPABOLU TEJASREE
 
‏‏VIRUS - 123455555555555555555555555555555555555555
‏‏VIRUS -  123455555555555555555555555555555555555555‏‏VIRUS -  123455555555555555555555555555555555555555
‏‏VIRUS - 123455555555555555555555555555555555555555kikilily0909
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |aasikanpl
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 

Recently uploaded (20)

Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutions
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptxBREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
BREEDING FOR RESISTANCE TO BIOTIC STRESS.pptx
 
‏‏VIRUS - 123455555555555555555555555555555555555555
‏‏VIRUS -  123455555555555555555555555555555555555555‏‏VIRUS -  123455555555555555555555555555555555555555
‏‏VIRUS - 123455555555555555555555555555555555555555
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 

Java Lab Manual for Diploma Students

  • 1. A Laboratory Manual for Java Programming Maharashtra State Board of Technical Education, Mumbai Third year Diploma in Computer Engineering Group (CO,CM,IF)
  • 2. CURRICULUM DEVELOPMENT CELL, MSBTE, MUMBAI. LABORATORY MANUAL DEVELOPMENT PROJECT © 2004,Maharashtra State Board of Technical Education, 49,Kherwadi, Aliyawar Jung Road, Bandra (East), Mumbai-400051, Maharashtra State, India. No part of this Laboratory Manual may be reproduced, in any form or by any means, without permission in writing from MSBTE Mumbai. Educational Consultant/ Dr. R.S. Mahashabde Dr. R.S. Mahashabde Regional Project Technical Teachers’ Training Technical Teachers’ Training Coordinator Institute, Extension Centre, Pune Institute, Extension Centre, Pune Project Institution Cursow Wadia Inst. of Tech., Pune Sou. Venutai Chavan Polytechnic, Pune Project Period April 2002 – March 2003 July 2004 – Feb. 2005 Chief Project Coordinator Principal, Shri N. S. Paradkar Principal, Shri. J. K. Warke Project Coordinator Shri. A. A. Jambhale, Shri. A. V. Kurkute, H. O. D., Comp. Deptt., H. O. D., Computer Technology CWIT., Pune Deptt., SVCP, Pune Course Coordinator Shri. P. S. Desai, — Lect. in Comp. Engg., CWIT., Pune Subject Experts 1) Shri. A. A. Jambhale, 1) Shri. G.J. Adhegaonkar, H. O. D., Comp. Deptt., Lect. in Comp. Tech., CWIT., Pune SVCP, Pune 2) Shri. P. S. Desai, 2) Shri. P.S. Desai, Lect. in Comp. Engg., Lect. in Comp. Engg., CWIT., Pune CWIT, Pune 3) Shri. G. J. Adhegaonkar, 3) Shri. A. V. Kurkute, Lect. in Computer Engg., H.O.D. Comp. Tech., SVCP, Pune SVCP, Pune Subject Editor — — Team for design Team for restructuringItem
  • 3. MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Certificate This is to certify that, Mr. / Ms. roll no. of Third Year Diploma in has completed the term work satisfactorily in Java Programming (1526) for the academic year 200 to 200 as prescribed in the curriculum. Place : Enrolment No.: Date : Exam. Seat No.: Subject Teacher Head of the Department Principal Seal of Institution
  • 4. MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 5 Java Programming LEARNING OVERVIEW Importance of the subject Welcome to the amazing and dynamic world of Java! Java is a programming language that was introduced by Sun Microsystems in June 1995. Java is most favoured language for web enabled application development. It is widely used for developing distributed and internet based applications. It is also used in communication programming. It is used for web oriented application development due to its features such as platform independence and portability. Due to OOPS support it offers new and powerful way to solve complex problems. It also has a huge collection of built in class libraries which ease the programming task. It has the most coveted robustness and built in security measures.Also the programs become clearer, reliable, and easily maintainable. It is widely accepted and is a well designed programming language. The students are expected to understand basic concepts of web enabled programming and be able to develop Java programming skills. The students are already familiar with object oriented principals through C++ programming, which serves as a good foundation to learn Java. Subject Objectives Today’s programming paradigm involves web enabled and distributed applications. There is heavy need of web enabled applications to cater to the needs of customers located around the globe. Java is a major tool used for developing web based applications as it provides platform independence. It is not only object oriented but also very robust and secure. Therefore in Software industries Java is widely used and forms a major part of skill set expected from aspiring software professionals. Features of Java Language Java is truly object oriented programming language mainly used for Internet applications. It can also be used for standalone application development. Following are the main features of Java – Compiled and Interpreted Java is a two stage system because it combines two approaches which are compiled and interpreted. First Java compiler translates source code into what is known as bytecode instructions. Byte codes are not machine instructions and therefore in the second stage, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program. Thus the Java is both a compiled and interpreted language. Platform Independent and Portable Java programs can be easily moved from one computer system to another, anywhere and anytime. Changes in upgrades in operating systems, processors and system resources will not force any changes in Java programs. Java ensures portability in two ways. First, Java compiler generates bytecode instructions that can be implemented on any machine. Secondly, the sizes of the data types are machine independent. Object Oriented Almost everything in Java is an object. All program code and data are placed within objects and classes. Java comes with an extensive set of classes and classes, arranged in packages that we can use in our programs by inheritance. This Java is a true object oriented language. Robust and Secure Java is a robust language. It provides many safeguards to give reliable code. It has strict compile time and run time checking for data types. It is designed as garbage collected language, so no need to worry about all memory management problems. Java also supports the concept of exception handling which captures serious errors and eliminates any risk of crashing the system. Security is the most important thing for a language i.e. used for programming on Internet. Threat of viruses and misuse of resources is everywhere. Java systems not only verify all memory access but also ♦ i
  • 5. 6 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Java Programming ensure that no viruses are communicated with an applet. The absence of pointers in Java ensures that programs cannot gain access to memory locations without proper authorization. Distributed Java is designed as a distributed language for creating applications on networks. It has the ability to share both data and programs. Java applications can open and access remote objects on Internet as easily as they can do in a local system. This enables multiple programmers at multiple remote locations to work together on a single object. Multithreaded and Interactive Multithreaded means handling multiple tasks simultaneously. Java supports multithreaded programs. This means that we need not wait for the application to finish one task before beginning another. For e.g. we can listen to music while scrolling a page and at the same time download an applet from a distant computer. This feature improves interactive performance of graphical applications. High Performance Java performance is high due to the use of intermediate bytecode. Java architecture is also designed to reduce overheads during runtime. The use of multithreading also increases overall execution speed of Java program. Dynamic and Extensible Java is a dynamic language. Java is capable of dynamically linking in new class libraries, methods and objects. Java programs support functions written in other languages such as C and C++. These functions are known as native methods. The efficient functions available in these languages can be used. Native methods are linked dynamically at run time. Principles and Concepts The Teacher will guide the students and give proper direction to learn following concepts & principles- Platform independence through Java virtual machine, Distributed applications, Security over network, Multithreaded applications, Understanding applet programming and event handling, Understanding polymorphism, Handling error using exception handling, Inheritance and types of inheritance, Using readymade classes in various packages, Accessing databases using Java open database connectivity, Communication using sockets, Application of Java language features in programs. Java Development Kit (JDK) The JDK comes with a collection of tools that are used for developing and running Java programs which include: appletviewer (for viewing Java applets) javac (Java compiler) java (Java interpreter) javap (Java disassembler) javah (for C header files) javadoc (for creating HTML documents) jdb (Java debugger) Following table lists these tools and their descriptions. Tool Description appletviewer Enables us to run Java applets (without using a Java compatible browser) java Java Interpreter, which runs applets and applications by reading and interpreting byte code files. javac Java compiler, which translates Java source code to bytecode files that the interpreter can understand. javadoc Creates HTML format documentation from Java source code files. javah Produces header files for use with native methods. javap Java disassembler, which enables us to convert bytecode files into a program. jdb Java debugger, which finds errors in programs. ii ♦
  • 6. MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 7 Java Programming The way these tools are applied to build and run application programs are shown below - To create a Java program we need to create a source code file using a text editor. The source code is compiled using javac and executed using Java interpreter java. The Java debugger jdb is used to find errors. A compiled Java program can be converted into a source code using Java disassembler javap. Java Virtual Machine (JVM) All language compilers translate source code into machine code for a specific computer. Java compiler produces an intermediate code known as bytecode for a machine that does not exist. This machine is called as Java Virtual Machine and it exists only inside the computer memory. Following figure shows the process of compiling a Java program into bytecode which is also called as Java Virtual Machine code. The Java Virtual Machine code is not machine specific. The machine specific code (known as machine code) is generated by the Java interpreter by acting as an intermediate between the virtual machine and the real machine as shown in following figure. The interpreter is different for different machines. ♦ iii
  • 7. 8 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Java Programming LINK / BLOCK DIAGRAM SHOWING INTER RELATIONSHIP OF SUBJECT AREAS, CURRICULUM OBJECTIVES & JOB PROFILE. iv ♦ HUMAN SCIENCE 1. Communication skills 2. Development of Generic skills ENGG. SCIENCE 1. Engineering Mathematics 2. Electrical Engineering CORE TECHNOLOGY 1. Computer Fundamental & Organization. 2. Programming in C 3. Digital Techniques 4. Microprocessor & Programming. 5. Computer Networks 6. Object Oriented Programming. 7. Database Management System. 8. System Analysis & Design. 9. Computer Architecture & Maintenance. 10.Peripherals, Testing & Measuring Instruments. (IT & CO) 11. Operating System. 12.Data Structure (CM) 13.Computer Peripherals & Interfacing. TECHNOLOGY SUBJECTS 1. Network Administration (IT & LM) 2. Web Page Designing. 3. Web Server Application. (CM) 4. Visual Basic Programming. 5. Java Programming. 6. N/W installation & Maintenance (IT & CO). 7. Troubleshooting & Repair of Computer System (CO). 8. Digital Computer Control (CO) JOB PROFILE 1. Entrepreneur 2. Industry • Customer Support Engineer • Technical Assistant • Project Manager. • System Analyst. • Database Administrator. • Software Developer. • N/W Administrator. • Web Page (Application) • Developer. • Hardware/Software • Consultant. • Customer Support. CURRICULUM OBJECTIVES 1. Develop attitudes for personal development. 2. Develop social skills for social development. 3. Develop continued learning skills for life long learning. 4. Develop Technical skills for industry activity. • Project management skills • Plan, Estimate, Procure & install hardware & software systems • Test & Certify software & hardware • Analyze & design software systems • Develop programming skills • Web server administration skills • Documentation skills • Troubleshooting, repair & maintenance of computer system • Installation, Maintenance & Administration of hardware • Manage computer resources • Develop marketing skills BASIC SCIENCE 1. Applied Physics 2. Applied Mathematics
  • 8. MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 9 Java Programming GRAPHICAL STRUCTURE OF SUBJECT AREA Third year- Computer Engineering JAVA PROGRAMMING (1526) ♦ v
  • 9. 10 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Java Programming DEVELOPMENT OF SKILLS Following intellectual skills will be developed through the subject of Java Programming - Intellectual Skills Description I1 Identify syntax for given program. I2 Select control statement. I3 Select built in classes and methods. I4 Develop algorithm. I5 Write program for given problem statement. I6 Analyze for given problem statement. Students will practice following motor skills- Motor Skills Description M1 Give proper indentation. M2 Follow naming conventions. GRID TABLE Following table gives grid of the experiments and related intellectual and motor skills. • Teacher shall ensure for development of generic skills during the practicals. • Students are expected to focus on acquiring specific skills mentioned therein. SN Experiment Title Intellectual skills Motor skills I1 I2 I3 I4 I5 I6 M1 M2 1 Introduction to Laboratory Work - - 2 Program to define a class and instantiate its object. - - 3 Program using String class. - 4 Program using wrapper class. 5 Program to define a class and create array of objects. 6 Program using Vector class. 7 Program to implement single inheritance. - - 8 Program to implement multiple inheritance using interface. - - 9 Program using user-defined exception. - - 10 Program to implement multithreading. - - 11 Program to implement synchronization. - - 12 Program using Applet. - 13 Program to design applet using AWT components. - 14 Program using Applet to handle events. - 15 Program for file processing. 16 Program to implement communication between client and server sockets. 17 Program to access database using JDBC-ODBC. 18 Mini Project NOTE : - Identified Skills STRATEGY FOR IMPLEMENTATION It is suggested that 40 to 50% experiments shall be completed in first term and remaining experiments in the second term. vi ♦
  • 10. MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 11 Java Programming GUIDELINES FOR TEACHERS Teachers shall discuss the following points with students before start of practicals of the subject. 1) Learning Overview: To Develop better understanding of importance of the subject. To Know related skills to be developed such as intellectual skills and Motor Skills. 2) Link / Block Diagram : Context of the subject in the form of link diagram showing interrelationship of various subject areas, curriculum objectives and job profile. 3) Graphical structure: In this topics and sub topics are organized in systematic way so that ultimate purpose of learning the subject is achieved. This is arranged in the form of fact, concept, principle, procedure, application and problem. 4) Know your Laboratory work : To understand the layout of laboratory, specifications of Equipment /Instruments/ Materials, procedure, working in groups, planning time etc. Also to know total amount of work to be done in the laboratory. 5) Teacher shall ensure that required equipment are in working condition before start of experiment, also keep operating instruction manual available. 6) Explain prior concepts to the students before starting of each experiment. 7) Involve students activity at the time of conduct of each experiment. 8) While taking reading/observation each student (from batch of 20 students) shall be given a chance to perform/observe the experiment. 9) List of questions is given at the end of each experiment. Teacher shall instruct the students to attempt all questions given at the end each experiment / exercise. Teacher shall ensure that each student writes the answers to the allotted questions in the laboratory manual after performance is over. 10) If the experimental setup has variations in the specifications of the equipment, the teachers are advised to make the necessary changes, wherever needed 11) Teacher shall assess the performance of students continuously as per norms prescribed by MSBTE. 12) Teacher should ensure that the respective skills and competencies are developed in the students after the completion of the practical exercise. 13) Teacher is expected to share the skills and competencies to be developed in the students. 14) Teacher may provide additional knowledge and skills to the students even though not covered in the manual but are expected from the students by the industries. 15) Teachers shall ensure that industrial visits recommended in the manual are covered. 16) Teacher may suggest the students to refer additional related literature of the technical papers / reference books / Seminar Proceedings, etc. 17) During assessment teacher is expected to ask questions to the students to tap their achievements regarding related knowledge and skills so that students can prepare while submitting record of the practicals. Focus should be given on development of enlisted skills rather than theoretical/codified knowledge. 18) Teacher should enlist the skills to be developed in the students that are expected by the industry. 19) Teacher should organised Group discussions / brain storming sessions/ Seminars to facilitate the exchange of knowledge amongst the students. 20) Teacher should ensure that revised CIAAN-2004 norms are followed simultaneously and progressively. 21) Teacher should give more focus on hands on skills and should actually share the same. 22) Teacher shall also refer to the Circular No. MSBTE/D-50/Lab Mannual / 2005 / 3183 dated 5th May, 2005 for additional guidelines. ♦ vii
  • 11. 12 ♦ MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Java Programming INSTRUCTIONS FOR STUDENTS Students shall read the points given below for understanding the theoretical concepts & practical applications. 1) Listen carefully to the lecture given by teacher about importance of subject, curriculum philosophy, graphical structure, skills to be developed, information about equipment, instruments, procedure, method of continuous assessment, tentative plan of work in laboratory and total amount of work to be done in a year. 2) Students shall undergo study visit of the laboratory for types of equipment, instruments, material to be used, before performing experiments. 3) Read the write up of each experiment to be performed, a day in advance. 4) Organize the work in the group and make a record of all observations. 5) Understand the purpose of experiment and its practical implications. 6) Write the answers of the questions allotted by the teacher during practical hours if possible or afterwards, but immediately. 7) Student should not hesitate to ask any difficulty faced during conduct of practical / exercise. 8) The student shall study all the questions given in the laboratory manual and practice to write the answers to these questions 9) Student shall visit the recommended industries and should study the knowhow of the shop floor practices and the operations of machines. 10) Student shall develop maintenance skills as expected by the industries. 10) Student should develop the habit of pocket discussion / group discussion related to the experiments / exercises so that exchanges of knowledge / skills could take place. 12) Student shall attempt to develop related hands-on-skills and gain confidence. 13) Student shall focus on development of skills rather than theoretical or codified knowledge. 14) Student shall visit the nearby workshops, workstation, industries, laboratories, technical exhibitions, trade fair etc. even not included in the Lab Manual. In short, students should have exposure to the area of work right in the student hood. 15) Student shall insist for the completion of recommended Laboratory Work, industrial visits, answers to the given questions, etc. 16) Student shall develop the habit of evolving more ideas, innovations, skills etc. than included in the scope of the manual. 17) Student shall refer technical magazines, proceedings of the Seminars, refer websites related to the scope of the subjects and update their knowledge and skills. 18) Student should develop the habit of not to depend totally on teachers but to develop self learning techniques. 19) Student should develop the habit to react with the teacher without hesitation with respect to the academics involved. 20) Student should develop habit to submit the practicals exercise continuously and progressively on the scheduled dates and should get the assessment done. 21) Student should be well prepared while submitting the write up of the exercise. This will develop the continuity of the studies and he will not be over loaded at the end of the term. viii ♦
  • 12. MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ♦ 13 Java Programming 1 Introduction to Laboratory Work 1 2 Program to define a class and instantiate 5 its object. 3 Program using String class. 11 4 Program using wrapper class. 17 5 Program to define a class and create 23 array of objects. 6 Program using Vector class. 29 7 Program to implement single inheritance. 37 8 Program to implement multiple 45 inheritance using interface. 9 Program using user-defined exception. 54 10 Program to implement multithreading. 60 11 Program to implement synchronization. 67 12 Program using Applet. 73 13 Program to design applet using AWT 80 components. 14 Program using Applet to handle events. 88 15 Program for file processing. 93 16 Program to implement communication 100 between client and server sockets. 17 Program to access database using 113 JDBC-ODBC. 18 Mini Project 122 Exp. Page Date of Date of Assess- Sign. of No. Name of the Experiments No. Perfor- submi - ment teacher & mance ssion Max. Remarks Marks 15 List of Experiments & Record of Progressive Assessment * To be transferred to proforma of CIAAN- 2004 Total Marks ………… Average Marks out of 15……* ♦ ix