RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA, BHOPAL
New Scheme Based On AICTE Flexible Curricula
CSE-Artificial Intelligence and Machine Learning/ Artificial Intelligence and Machine Learning
IV-Semester
AL406 Java Lab
Course Objectives:
1. Understand fundamentals of programming such as variables, conditional and iterativeexecution,
methods, etc.
2. Understand fundamentals of object-oriented programming in Java and be familiar of theimportant
concepts like class, inheritance and multithreading, AWT and JDBC.
3. Students will able to use the Java SDK environment to create, debug and run simple Javaprograms.
Unit 1. Overview of Java, Installation, First Simple Program, Compilation process, JavaKeywords ,
Identifiers , Literals, Comments, Data Types, Variables, Dynamic initialization, typeconversion and
casting, Operators, Control Statements.
Unit 2. Declaring Objects, Introducing Methods, Constructors, this Keyword, GarbageCollection, finalize
Method, Overloading Methods, Overloading Constructors, Using Objects asParameters, Inheritance,
Creating a Multilevel Hierarchy, Packages and Interfaces, ExceptionHandling, Multithreaded
Unit [Link] Applet Class: Applet Basics, The Applet Class, Applet Architecture, AppletInitialization and
Termination , Simple Applet Display Methods, Simple Banner Applet, Usingthe Status Window, The
HTML APPLET Tag, Passing Parameters to Applets, Improving theBanner Applet.
Unit 4. Introducing the AWT: Working with Windows, Graphics, and Text, AWT Classes,Window
Fundamentals, Component, Container, Panel, Frame, Working with Frame Windows,Handling Events in
a Frame Window, AWT Controls, Layout Managers, and Menus, Addingand Removing Controls, Grid
Layout, Border Layout, introduction to swing and servlet.
Unit [Link] Handling, Two Event Handling Mechanisms, The Delegation Event Model,Events, Event
Sources, Event Listeners, Event Classes, The Mouse Event Class and others,JDBC: JDBCODBC bridge,
the connectivity model, the driver manager, navigating the result setobject contents, the JDBC exceptional
classes, connecting to remote database.
Reference Books:
1. E. Balagurusamy, “Programming with java A Primer”, McGrawHill.
2. Sharanam Shah, “ Core Java 8 for Beginners”, Shroff Publisher.
3. Naughton &Schildt, “The Complete Reference Java 2”, Tata McGraw Hill.
4. Horstmann& Cornell, “Core Java 2” (Vol I &II ), Pearson.
List of Experiments:
1. Write a program that accepts two numbers from the user and print their sum.
2. Write a program to calculate addition of two number using prototyping of methods.
3. Program to demonstrate function overloading for calculation of average.
4. Program to demonstrating overloaded constructor for calculating box volume.
5. Program to show the detail of students using concept of inheritance.
6. Program to demonstrate package concept.
7. Program to demonstrate implementation of an interface which contains two methodsdeclaration square
and cube.
8. Program to demonstrate exception handling in case of division by zero error.
9. Program to demonstrate multithreading.
10. Program to demonstrate JDBC concept using create a GUI based application for student information.
11. Program to display “Hello World” in web browser using applet.
12. Program to add user controls to applets.
13. Write a program to create an application using concept of swing.
14. Program to demonstrate student registration functionality using servlets with session management.