You are on page 1of 39

Summer Training Report on

JAVA SE Platform 8
Training Report Submitted in Partial Fulfillment of BE IT Final Year
Bachelor of Engineering
in
Information Technology
Submitted by
Parth Agarwal: 16ITE38023

Department of Computer Science and Engineering


M.B.M. Engineering College
Faculty of Engineering & Architecture
Session 2018-19

Supervised by: Submitted to:


Mr. Shaikh Alfozen Dr. Anil Gupta
(Founder, Director) (Head of Department)
DMATICS Technologies Dept. of Computer Science and Engg
(May 01, 2017 to July 03,2017)

[Type text] Page 1


ACKNOWLEDGEMENT

The satisfaction that accompanies that the successful completion of any task would be
incomplete without the mention of people whose ceaseless cooperation made it possible, whose
constant guidance and encouragement crown all efforts with success.
We are grateful to our training guide Mr. Shaikh Alfozen for the guidance, inspiration and
constructive suggestions that helpful us understanding this language better.
We also thank our colleagues who have helped in successful completion of this training.

[Type text] Page 2


Contents

1. Introduction ……………………………………………………………………………………….. 3

2. History………………………………………………………………………………………………… 4

3. Basics of JAVA…………………………………………………………………………………….. 5

4. Downloading and Installation…………………………………………………………….. 9

5. OOPS Concepts…………………………………………………………………………………… 17

6. JAVA Classes, Blocks, Constructors……………………………………………………… 26

7. Exception Handling & Multithreading……………………………….... 29

8. Applets…………………………………………………………………... 31

9. Project Undertaken…………………………………………………….. 33

Conclusion

[Type text] Page 3


Chapter 1
INTRODUCTION

Java is one of the programming language or technology used for developing web applications.
Java language developed at SUN Micro Systems in the year 1995 under the guidance of James
Gosling and there team. Originally SUN Micro Systems is one of the Academic university
(Standford University Network)

Whatever the software developed in the year 1990, SUN Micro Systems has released on the
name of oak, which is original name of java (scientifically oak is one of the tree name). The
OAK has taken 18 months to develop.The oak is unable to fulfill all requirements of the
industry. So James Gosling again reviews this oak and released with the name of java in the
year 1995. Scientifically java is one of the coffee seed name.

Java divided into three categories, they are


 J2SE (Java 2 Standard Edition)
 J2EE (Java 2 Enterprise Edition)
 J2ME (Java 2 Micro or Mobile Edition)

J2SE
J2SE is used for developing client side applications.

J2EE
J2EE is used for developing server side applications.

J2ME
J2ME is used for developing mobile or wireless application by making use of a predefined
protocol called WAP (wireless Access / Application protocol).

[Type text] Page 4


Chapter 2
History
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June
1991. Java was originally designed for interactive television, but it was too advanced for the
digital cable television industry at the time. The language was initially called Oak after an oak
tree that stood outside Gosling's office. Later the project went by the name Green and was finally
renamed Java, from Java coffee. Gosling designed Java with a C/C++-style syntax that system
and application programmers would find familiar.

Sun Microsystems released the first public implementation as Java 1.0 in 1996. It promised
"Write Once, Run Anywhere" (WORA), providing no-cost run-times on popular platforms.
Major web browsers soon incorporated the ability to run Java applets within web pages, and
Java quickly became popular. The Java 1.0 compiler was re-written in Java by Arthur van Hoff
to comply strictly with the Java 1.0 language specification. With the advent of Java 2 (released
initially as J2SE 1.2 in December 1998 – 1999), new versions had multiple configurations built
for different types of platforms. J2EE included technologies and APIs for enterprise applications
typically run in server environments, while J2ME featured APIs optimized for mobile
applications. The desktop version was renamed J2SE. In 2006, for marketing purposes, Sun
renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.

In 1997, Sun Microsystems approached the ISO/IEC JTC 1 standards body and later the Ecma
International to formalize Java, but it soon withdrew from the process. At one time, Sun made
most of its Java implementations available without charge, despite their proprietary software
status. Sun generated revenue from Java through the selling of licenses for specialized products
such as the Java Enterprise System.

On November 13, 2006, Sun released much of its Java virtual machine (JVM) as free and open-
source software, (FOSS), under the terms of the GNU General Public License (GPL). On May 8,
2007, Sun finished the process, making all of its JVM's core code available under free
software/open-source distribution terms, aside from a small portion of code to which Sun did not
hold the copyright.

Sun's vice-president Rich Green said that Sun's ideal role with regard to Java was as an
"evangelist".Following Oracle Corporation's acquisition of Sun Micro-systems in 2009–10,
Oracle has described itself as the "steward of Java technology with a relentless commitment to
fostering a community of participation and transparency". This did not prevent Oracle from
filing a lawsuit against Google shortly after that for using Java inside the Android SDK (see
Google section below). Java software runs on everything from laptops to data centers, game
consoles to scientific supercomputers. On April 2, 2010, James Gosling resigned from Oracle.

In January 2016, Oracle announced that Java run-time environments based on JDK 9 will
discontinue the browser plugin.

[Type text] Page 5


Chapter 3
Basics of JAVA
3.1 Overview Of Java
Java is a platform independent, more powerful, secure, high performance, multithreaded
programming language. Here we discuss some points related to java.

Define JRE
The Java Runtime Environment (JRE) is part of the Java Development Kit (JDK). It
contains set of libraries and tools for developing java application. The Java Runtime
Environment provides the minimum requirements for executing a Java application.

Define JVM
JVM is set of programs developed by sun Micro System and supplied as a part of jdk for
reading line by line of byte code and it converts into native understanding form of operating
system. Java language is one of the compiled and interpreted programming language.

Garbage Collector
Garbage Collector is the system Java program which runs in the background along with
regular Java program to collect un-Referenced (unused) memory space for improving the
performance of our applications.

Define an API
An API (Application Programming Interface) is a collection of packages, a package is the
collection of classes, interfaces and sub-packages. A sub-package is a collection of classes
interfaces and sub sub packages etc.
Java programming is containing user friendly syntax so that we can develop effective
application s. in other words if any language is providing user friendly syntax, we can develop
error free applications.

Definition of JIT
JIT is the set of programs developed by SUN Micro System and added as a part of JVM, to
speed up the interpretation phase

3.2 Features Of JAVA


Features of a language are nothing but the set of services or facilities provided by the language
vendors to the industry programmers. Some important features are;

[Type text] Page 6


3.3 Java Classpath Setting

Path Variable
Path variable is set for providing path for all java tools like java, javac, javap, javah, jar,
appletviewer which are use in java programming. These all tools are available in bin folders
so we set path upto bin folders.

Classpath Variable
Classpath variable is set for providing path for predefined java classes which is used in our
application. All classes are available in lib/rt.jar so we set classpath upto lib/rt.jar.

3.4 Steps For CompilingAnd Executing Programs


The following sequence of steps represented in the diagram use compiling the java program
and executing the java programs.

[Type text] Page 7


3.5 Difference Between JDK,JRE AND JVM
Jvm, Jre, Jdk these all the backbone of java language. Each components have separate works.
Jdk and Jre physically exists but Jvm are abstract machine it means it not physically exists.

JVM : JVM (Java Virtual Machine) is a software. It is a specification that provides runtime
environment in which java bytecode can be executed. It not physically exists.JVMs are not
same for all hardware and software, for example for window os JVM is different and for Linux
VJM is different. JVM, JRE and JDK are platform dependent because configuration of each OS
differs. But, Java is platform independent.

JRE : The Java Runtime Environment (JRE) is part of the Java Development Kit (JDK). It
contains set of libraries and tools for developing java application. The Java Runtime
Environment provides the minimum requirements for executing a Java application. It physically
exists. It contains set of libraries + other files that JVM uses at runtime.

JDK : The Java Development Kit (JDK) is primary components. It physically exists. It is
collection of programming tools and JRE, JVM.

[Type text] Page 8


3.5 Data Types & Variables
Datatype is a spacial keyword used to allocate sufficient memory space for the data, in other
words Data type is used for representing the data in main memory (RAM) of the computer.
In general every programming language is containing three categories of data types. They are

 Fundamental or primitive data types


 Derived data types
 User defined data types.
Data Type Default Value Default size

Boolean False 1 bit

Char '\u0000' 2 byte

Byte 0 1 byte

Short 0 2 byte

Int 0 4 byte

Long 0L 8 byte

Float 0.0f 4 byte

Double 0.0d 8 byte

Variable
Variable is an identifier which holds data or another one variable is an identifier whose value
can be changed at the execution time of program. Variable is an identifier which can be used
to identify input data in a program.

Operators And Its Types


Operator is a special symbol that tells the compiler to perform specific mathematical or
logical Operation. Java supports following lists of operators.
 Arithmetic Operators
 Relational Operators
 Logical Operators
 Bitwise Operators
 Assignment Operator

[Type text] Page 9


Chapter 4
Downloading and Installation

4.1 Downloading
Following are steps to install Java in Windows

Step 1) Go to official website of Oracle. Click on Download JDK. For java latest version.

Step 2) Next,

1. Accept License Agreement


2. Download latest Java JDK for your version(32 or 64 bit) of java for Windows.

[Type text] Page 10


Step 3) Once the download is complete, run the exe for install JDK.

4.2 How to set Environment Variables in Java: Path and Classpath

[Type text] Page 11


The PATH variable gives the location of executables like javac, java etc. It is possible to run a
program without specifying the PATH but you will need to give full path of executable like
C:\Program Files\Java\jdk1.8.0_131\bin\javac A.java instead of simple javac A.java

The CLASSPATH variable gives location of the Library Files.

Let's look into the steps to set the PATH and CLASSPATH

Step 1) Right Click on the My Computer and Select the properties

Step 2) Click on advanced system settings

Step 3) Click on Environment Variables

[Type text] Page 12


Step 4) Click on new Button of User variables

Step 5) Type PATH in the Variable name.

[Type text] Page 13


Step 6) Copy the path of bin folder which is installed in JDK folder.

Step 7) Paste Path of bin folder in Variable value and click on OK Button.

Note: In case you already have a PATH variable created in your PC, edit the PATH variable to

PATH = <JDK installation directory>\bin;%PATH%;

Here, %PATH% appends the existing path variable to our new value

Step 8) You can follow a similar process to set CLASSPATH.

[Type text] Page 14


Note: In case you java installation does not work after installation, change classpath to

CLASSPATH = <JDK installation directory>\lib\tools.jar;

Step 9) Click on OK button

Step 10) Go to command prompt and type javac commands.

If you see a screen like below, Java is installed.

[Type text] Page 15


[Type text] Page 16
4.4 Running a Simple Java Program

[Type text] Page 17


Chapter 5
Oops Concepts
5.1 Class
A class is the template or blueprint from which objects are made. Thinking about classes as
cookie cutters. Objects are the cookies themselves. When you construct an object from a class,
you are said to have created an instance of the class.

General form of a class :


A class is declared by use of the class keyword. The classes can get much more complex.The
general form of a class definition is shown as

class class_name
{
type instance-variable1;
type instance-variable2;

type method-name(parameter-list){
//body of method
}
}

[Type text] Page 18


5.2 Objects
 Objects are the basic run time entity or in other words object is a instance of a class . An
object is a software bundle of variables and related methods of the special class.
 Each object made from a class can have its values for the instance variables of that class.

Syntax for the Object :


class_name object_name = new class_name();

To work with OOP, you should be able to identify three key characteristics of objects:
• The object’s behavior—What can you do with this object, or what methods can you apply to it?
• The object’s state—How does the object react when you apply those methods?
• The object’s identity—How is the object distinguished from others that may have the same
behavior and state?

[Type text] Page 19


5.3 Methods
A class has one or more methods .Methods must be de clared inside the class.Within the curly
braces of a method, write the instructions for how that method should be performed. Method
code is basically a set of statements , and you can think of a method kind of like a function or
procedure.

public class class_name


{
returntype method_name()
{
//statements;
}

[Type text] Page 20


}

5.4 Inheritance
 When one class inherits from another , it is called Inheritance.
 The class which is inherited is called superclass and the class which inherits is called
subclass.
 So we can say that subclass extends superclass but subclass can add new methods and
instance variables of its own and it can override the methods of superclass.

Example :

[Type text] Page 21


5.5 Interface

[Type text] Page 22


 Interfaces are similar to classes but they lack instance variables and their methods are
declared without any body.

 Any number of classes can implement an interface, also one class can implement any
number of interfaces.

 So , by implementing many interfaces in a same class , we can use the concept of


multiple inheritance.

 All the methods in an interface are public.

To make a class implement an interface , we carry out 2 steps:

1.Declare that class intends to implement the given interface.

2.Supply definition for all methods in the interface.

Defining an Interface:

access modifier interface name{

returntype method1(parameter list);

returntype method2(parameter list);

Implementing an interface:

access modifier class classname implements interface{

returntype method1(){

//body

returntype method2(){

// body

[Type text] Page 23


5.5 Abstraction
The process of abstraction in Java is used to hide certain details and only show the essential
features of the object. Through the process of abstraction, a programmer hides all but the
relevant data about an object in order to reduce complexity and increase efficiency. In the same
way that abstraction sometimes works in art, the object that remains is a representation of the
original, with unwanted detail omitted. The resulting object itself can be referred to as an
abstraction, meaning a named entity made up of selected attributes and behavior specific to a
particular usage of the originating entity.

 An abstract class has no use , no value , no purpose in life unless it is extended.


 An abstract class means that nobody can ever make a new instance of that class.

Syntax:

abstract public class canine extends Animal


{
Public void roam()
{
}
}

5.6 Polymorphism
 It describes the ability of the object in belonging to different types with specific behavior
of each type.
 It can be done by two ways:

 Overloading
 Overriding
Overloading

 An overloaded method is just a different method that happens to have the same method
name.
 An overloaded method is NOT the same as an overridden method.
 The returntype can be different.
 The number of parameters can be different.
 Datatype of parameters can also be different.

Example

public class overloads


{
String uniqueID;
public int addNums(int a,int b)
{

[Type text] Page 24


return a+b;
}
public double addNums(double a , double b)
{
return a+b;
}
}

Overriding

 An instance method in a subclass with the same signature and returntypes as an instance
method in the superclass overrides the siperclass’s method.
 The overriding method has same name , numer and types of parameters and return types
as the method it overrides.
 If a subclass defines a method with same signature as a class method in the superclass ,
the method in subclass hides the one in superclass.

public class Animal {


public static void testClassMethod() {
System.out.println(“The class method in Animal”);
}
public void testInstanceMethod() {
System.out.println(“The instance method in Animal”);
}
}

Public class Cat extends Animal{


Public static void testClassMethod(){
System.out.println(“The Class Method in Cat”);
}
Public void testInstanceMethod(){
System.out.println(“The Instance method in Cat.”);
}

Public static void main(String args[]){


Cat mycat= new Cat();
Animal myanimal= mycat();
Animal.testClassMethod();
Myanimal.testInsatnceMethod();
}
}

The cat class overrides the instance method in Animal.

[Type text] Page 25


The Output from this program is as follows:

The class method in Animal.


The instance method in Cat.

5.7 Encapsulation
Encapsulation is the concept of hiding the implementation details of a class and allowing access
to the class through a public interface. For this, we need to declare the instance variables of the
class as private or protected.

The client code should access only the public methods rather than accessing the data directly.
Also, the methods should follow the Java Bean's naming convention of set and get.

Encapsulation makes it easy to maintain and modify code. The client code is not affected when
the internal implementation of the code changes as long as the public method signatures are
unchanged. For instance:

public class Employee


{
private float salary;
public float getSalary()
{
return salary;
}
public void setSalary(float salary)
{
this.salary = salary;
}

[Type text] Page 26


Chapter 6

JAVA Classes, Blocks and Constructors

6.1 Abstract Classes

We know that every java program must start with a concept of class that is without classes
concept there is no java program perfect.In java programming we have two types of classes they
are

1. Concrete class
2. Abstract class

6.2 Constructor And Its Types

A constructor is a special member method which will be called implicitly (automatically) by the
JVM whenever an object is created for placing user or programmer defined values in place of
default values. In a single word constructor is a special member method which will be called
automatically whenever object is created.

The purpose of constructor is to initialize an object called object initialization. Constructors are
mainly create for initializing the object. Initialization is a process of assigning user defined values
at the time of allocation of memory space.

Types of constructors

Based on creating objects in Java constructor are classified in two types. They are

 Default or no argument Constructor

 Parameterized constructor.

6.3 Static Block in Java

[Type text] Page 27


Static block is a set of statements, which will be executed by the JVM before execution of main
method. At the time of class loading if we want to perform any activity we have to define that
activity inside static block because static block execute at the time of class loading.

In a class we can take any number of static block but all these static block will be execute from top
to bottom.

6.5 Relationship in Java

Type of relationship always makes to understand how to reuse the feature from one class to
another class. In java programming we have two types of relationship they are.

 Is-A Relationship

 Has-A Relationship

6.6 ‘This’ keyword


When we declare the name of instance variable and local variables same , This keyword helps us
to avoid name conflicts.
In the example, this.length and this.breadth refers to the instance variable length and breadth
while length and breadth refers to the arguments passed in the method

Example

class Rectangle{
int length,breadth;
void show(int length,int breadth){
this.length=length;
this.breadth=breadth;
}
int calculate(){
return(length*breadth);
}
}
public class UseOfThisOperator{
public static void main(String[] args){
Rectangle rectangle=new Rectangle();
rectangle.show(5,6);

[Type text] Page 28


int area = rectangle.calculate();
System.out.println("The area of a Rectangle is : " + area);
}
}

Output:

C:\java>java UseOfThisOperator
The area of a Rectangle is : 30

[Type text] Page 29


Chapter 7
Exception Handling & Multithreading
7.1 Exception Handling

 An exception arises in code at runtime.


 Exception are a clean way to manage abnormal states.
 Exception : mild error which you can handle.
 Error: serious error cause termination.
 An Exception is thrown and then caught.

Exception, that means exceptional errors. Actually exceptions are used for handling errors in
programs that occurs during the program execution. During the program execution if any error
occurs and you want to print your own message or the system message about the error then you
write the part of the program which generate the error in the try{} block and catch the errors
using catch() block. Exception turns the direction of normal flow of the program control and
send to the related catch() block. Error that occurs during the program execution generate a
specific object which has the information about the errors occurred in the program.

How to handle Exceptions?

[Type text] Page 30


7.2 Multithreading

 Multithreaded programs extend the idea of multitasking.


 Individual programs will appear to do multiple tasks at the same time . Each task is called
a thread.
 Programs that can run more than one thread at once are said to be multithreaded.
 Process speed can be increased by using threads because the thread can stop or suspend a
specific running process and start or resume the suspended processes.

Example:

public class Threads{


public static void main(String[] args){
Thread th = new Thread();
System.out.println("Numbers are printing line by line after 5 seconds : ");
try{
for(int i = 1;i <= 10;i++)
{
System.out.println(i);
th.sleep(5000);
}
}
catch(InterruptedException e){
System.out.println("Thread interrupted!");
e.printStackTrace();
}
}
}

Output:

1
2
3
4
5
6
7
8
9
10

[Type text] Page 31


Chapter 8
Applet
 A Java applet is an applet delivered to the users in the form of Java bytecode. Java
applets can run in a Web browser using a Java Virtual Machine (JVM), or
in Sun's AppletViewer, a stand-alone tool for testing applets. Java applets were
introduced in the first version of the Java language in 1995.
 Applets are also used to create onlinegame collections that allow players to compete
against live opponents in real-time.

A Java applet can have any or all of the following advantages:

 It is simple to make it work on Linux, Windows and Mac OS i.e. to make it cross
platform. Applets are supported by most web browsers
 Applets also improve with use: after a first applet is run, the JVM is already running and
starts quickly (JVM will need to restart each time the browser starts fresh).
 It can move the work from the server to the client, making a web solution more scalable
with the number of users/clients
 The applet naturally supports the changing user state like figure positions on the
chessboard.

Example:

[Type text] Page 32


[Type text] Page 33
Project Undertaken

How to make Notepad using JAVA


Below is the code written to create a Notepad using Java
1. Notepad.java
package Notepad;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Scanner;
import java.io.*;

public class Notepad extends JFrame implements ActionListener {


private TextArea textArea = new TextArea("", 0,0,
TextArea.SCROLLBARS_VERTICAL_ONLY);
private MenuBar menuBar = new MenuBar(); // first, create a MenuBar item
private Menu file = new Menu(); // our File menu
// what's going in File? let's see...
private MenuItem openFile = new MenuItem(); // an open option
private MenuItem saveFile = new MenuItem(); // a save option
private MenuItem close = new MenuItem(); // and a close option!

public Notepad() {
this.setSize(500, 300); // set the initial size of the window
this.setTitle("Java Notepad Tutorial"); // set the title of the window
setDefaultCloseOperation(EXIT_ON_CLOSE); // set the default close operation
(exit when it gets closed)
this.textArea.setFont(new Font("Century Gothic", Font.BOLD, 12)); // set a
default font for the TextArea
// this is why we didn't have to worry about the size of the TextArea!

[Type text] Page 34


this.getContentPane().setLayout(new BorderLayout()); // the BorderLayout bit
makes it fill it automatically
this.getContentPane().add(textArea);

// add our menu bar into the GUI


this.setMenuBar(this.menuBar);
this.menuBar.add(this.file); // we'll configure this later

// first off, the design of the menuBar itself. Pretty simple, all we need to do
// is add a couple of menus, which will be populated later on
this.file.setLabel("File");

// now it's time to work with the menu. I'm only going to add a basic File menu
// but you could add more!

// now we can start working on the content of the menu~ this gets a little
repetitive,
// so please bare with me!

// time for the repetitive stuff. let's add the "Open" option
this.openFile.setLabel("Open"); // set the label of the menu item
this.openFile.addActionListener(this); // add an action listener (so we know when
it's been clicked
this.openFile.setShortcut(new MenuShortcut(KeyEvent.VK_O, false)); // set a
keyboard shortcut
this.file.add(this.openFile); // add it to the "File" menu

// and the save...


this.saveFile.setLabel("Save");
this.saveFile.addActionListener(this);
this.saveFile.setShortcut(new MenuShortcut(KeyEvent.VK_S, false));
this.file.add(this.saveFile);

// and finally, the close option

[Type text] Page 35


this.close.setLabel("Close");
// along with our "CTRL+F4" shortcut to close the window, we also have
// the default closer, as stated at the beginning of this tutorial.
// this means that we actually have TWO shortcuts to close:
// 1) the default close operation (example, Alt+F4 on Windows)
// 2) CTRL+F4, which we are about to define now: (this one will appear in the
label)
this.close.setShortcut(new MenuShortcut(KeyEvent.VK_F4, false));
this.close.addActionListener(this);
this.file.add(this.close);
}

public void actionPerformed (ActionEvent e) {


// if the source of the event was our "close" option
if (e.getSource() == this.close)
this.dispose(); // dispose all resources and close the application

// if the source was the "open" option


else if (e.getSource() == this.openFile) {
JFileChooser open = new JFileChooser(); // open up a file chooser (a
dialog for the user to browse files to open)
int option = open.showOpenDialog(this); // get the option that the user
selected (approve or cancel)
// NOTE: because we are OPENing a file, we call showOpenDialog~
// if the user clicked OK, we have "APPROVE_OPTION"
// so we want to open the file
if (option == JFileChooser.APPROVE_OPTION) {
this.textArea.setText(""); // clear the TextArea before applying the
file contents
try {
// create a scanner to read the file
(getSelectedFile().getPath() will get the path to the file)
Scanner scan = new Scanner(new
FileReader(open.getSelectedFile().getPath()));

[Type text] Page 36


while (scan.hasNext()) // while there's still something to
read
this.textArea.append(scan.nextLine() + "\n"); //
append the line to the TextArea
} catch (Exception ex) { // catch any exceptions, and...
// ...write to the debug console
System.out.println(ex.getMessage());
}
}
}

// and lastly, if the source of the event was the "save" option
else if (e.getSource() == this.saveFile) {
JFileChooser save = new JFileChooser(); // again, open a file chooser
int option = save.showSaveDialog(this); // similar to the open file, only
this time we call
// showSaveDialog instead of showOpenDialog
// if the user clicked OK (and not cancel)
if (option == JFileChooser.APPROVE_OPTION) {
try {
// create a buffered writer to write to a file
BufferedWriter out = new BufferedWriter(new
FileWriter(save.getSelectedFile().getPath()));
out.write(this.textArea.getText()); // write the contents of
the TextArea to the file
out.close(); // close the file stream
} catch (Exception ex) { // again, catch any exceptions and...
// ...write to the debug console
System.out.println(ex.getMessage());
}
}
}
}
// the main method, for actually creating our notepad and setting it to visible.

[Type text] Page 37


public static void main(String args[]) {
Notepad app = new Notepad();
app.setVisible(true);

}
}

2. Main.java

import notepad.*;
public class main
{
public static void main(String args[]){
Notepad app=new Notepad();
app.setVisible(true);
}
}

[Type text] Page 38


Conclusion
This training course that I undertook, was truly a very rewarding experience for me. It has given
a big thrust to my technical knowledge as a prospertice Software professional. It also helped me
enhance my skills on a personal front.
I feel extremely satisfied ny the fact that I have completed the training course. I think I have
exploited the opportunity that came my way to the fullest extent by increasing my technical
know-how and also gaining the valuable learning experience.

[Type text] Page 39

You might also like