Java
Java
Internal verification:
Table of Contents
I.INTRODUCTION ................................................................................................................. 4
II.ALGORITHM ...................................................................................................................... 5
Coding: ........................................................................................................................... 12
Debugging: ..................................................................................................................... 13
Testing: .......................................................................................................................... 13
Documentation: .............................................................................................................. 13
Maintenance: .................................................................................................................. 13
A .METHODS: .............................................................................................................. 23
Object ................................................................................................................................. 33
Class ................................................................................................................................... 33
OOPS concepts are as follows: .......................................................................................... 35
II.DEMO ................................................................................................................................ 47
4.DEBUGGING
VII. REFERENCES
I.INTRODUCTION
It is used for:
*Desktop applications
*Web applications
*Games
*Database connection
In addition
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
Java is an object oriented language which gives a clear structure to programs and allows code
to be reused, lowering development costs
As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice
versa
II.ALGORITHM
Algorithm Defenition
The word Algorithm means ” A set of rules to be followed in calculations or other problem-
solving operations ” Or ” A procedure for solving a mathematical problem in a finite number
of steps that frequently involves recursive operations”.
Well-definited
Well-definited
inputs
output
Characteristics
Clear and
of an algorithm Finite-ness
unambiguous
Language
feasible
independent
As one would not follow any written instructions to cook the recipe, but only the standard
one. Similarly, not all written instructions for programming is an algorithms. In order for
some instructions to be an algorithm, it must have the following characteristics:
• Clear and Unambiguous: The algorithm should be clear and unambiguous. Each of
its steps should be clear in all aspects and must lead to only one meaning.
• Well-Defined Inputs: If an algorithm says to take inputs, it should be well-defined
inputs.
• Well-Defined Outputs: The algorithm must clearly define what output will be yielded
and it should be well-defined as well.
• Finite-ness: The algorithm must be finite, i.e. it should terminate after a finite time.
• Feasible: The algorithm must be simple, generic, and practical, such that it can be
executed with the available resources. It must not contain some future technology or
anything.
• Language Independent: The Algorithm designed must be language-independent, i.e.
it must be just plain instructions that can be implemented in any language, and yet the
output will be the same, as expected.
Properties of Algorithm:
• It should terminate after a finite time.
• It should produce at least one output.
• It should take zero or more input.
• It should be deterministic means giving the same output for the same input case.
• Every step in the algorithm must be effective i.e. every step should do some work.
Types of Algorithms:
There are several types of algorithms available. Some important algorithms are:
1. Brute Force Algorithm: It is the simplest approach for a problem. A brute force
algorithm is the first approach that comes to finding when we see a problem.
2. Recursive Algorithm: A recursive algorithm is based on recursion. In this case, a
problem is broken into several sub-parts and called the same function again and again.
3. Backtracking Algorithm: The backtracking algorithm basically builds the solution by
searching among all possible solutions. Using this algorithm, we keep on building the
solution following criteria. Whenever a solution fails we trace back to the failure point and
build on the next solution and continue this process till we find the solution or all possible
solutions are looked after.
4. Searching Algorithm: Searching algorithms are the ones that are used for searching
elements or groups of elements from a particular data structure. They can be of different
types based on their approach or the data structure in which the element should be found.
5. Sorting Algorithm: Sorting is arranging a group of data in a particular manner
according to the requirement. The algorithms which help in performing this function are
called sorting algorithms. Generally sorting algorithms are used to sort groups of data in
an increasing or decreasing manner.
6. Hashing Algorithm: Hashing algorithms work similarly to the searching algorithm.
But they contain an index with a key ID. In hashing, a key is assigned to specific data.
7. Divide and Conquer Algorithm: This algorithm breaks a problem into sub-problems,
solves a single sub-problem and merges the solutions together to get the final solution. It
consists of the following three steps:
• Divide
• Solve
• Combine
8. Greedy Algorithm: In this type of algorithm the solution is built part by part. The
solution of the next part is built based on the immediate benefit of the next part. The one
solution giving the most benefit will be chosen as the solution for the next part.
9. Dynamic Programming Algorithm: This algorithm uses the concept of using the
already found solution to avoid repetitive calculation of the same part of the problem. It
divides the problem into smaller overlapping subproblems and solves them.
10. Randomized Algorithm: In the randomized algorithm we use a random number so it
gives immediate benefit. The random number helps in deciding the expected outcome.
Disadvantages of Algorithms:
Advantages of Algorithms:
1. The problem that is to be solved by this algorithm i.e. clear problem definition.
2. The constraints of the problem must be considered while solving the problem.
3. The input to be taken to solve the problem.
4. The output to be expected when the problem is solved.
5. The solution to this problem, is within the given constraints.
Then the algorithm is written with the help of the above parameters such that it solves the
problem.
Example: Consider the example to add three numbers and print the sum.
OUTPUT:
One problem, many solutions: The solution to an algorithm can be or cannot be more
than one. It means that while implementing the algorithm, there can be more than one
method to implement it. For example, in the above problem to add 3 numbers, the sum can
be calculated in many ways like:
• + operator
• Bit-wi9se operators
• . . etc
Problem Definition:
• The first step in the process of program development is the thorough understanding
and identification of the problem for which is the program or software is to be
developed.
• In this step the problem has to be defined formally.
• All the factors like Input/output, processing requirement, memory requirements, error
handling, interfacing with other programs have to be taken into consideration in this
stage.
Program Design:
• The next stage is the program design. The software developer makes use of tools like
algorithms and flowcharts to develop the design of the program.
o Algorithm
o Flowchart
Coding:
• Once the design process is complete, the actual computer program is written, i.e. the
instructions are written in a computer language.
• Coding is generally a very small part of the entire program development process and
also a less time consuming activity in reality.
• In this process all the syntax errors i.e. errors related to spelling, missing commas,
undefined labels etc. are eliminated.
• For effective coding some of the guide lines which are applied are :
o Use of meaningful names and labels of variables,
o Simple and clear expressions,
o Modularity with emphasis on making modules generalized,
o Making use of comments and indenting the code properly,
o Avoiding jumps in the program to transfer control.
Debugging:
• At this stage the errors in the programs are detected and corrected.
• This stage of program development is an important process. Debugging is also
known as program validation.
• Some common errors which might occur in the programs include:
o Un initialization of variables.
o Reversing of order of operands.
o Confusion of numbers and characters.
o Inverting of conditions eg jumping on zero instead of on not zero.
Testing:
Documentation:
Maintenance:
• Updating and correction of the program for changed conditions and field experience
is accounted for in maintenance.
• Maintenance becomes essential in following situations:
o Change in specification,
o Change in equipment,
o Errors which are found during the actual execution of the program.
PROGRAM :
OUTPUT :
PROGRAM :
OUTPUT:
3 . Algorithm find : Looking for that whether the value “x” is in the array “a”
or not . if it’s true , program will print out the position of value “x”.
Data representation : Program including :
Int [] a
Int n : the number of elements wanting to add on array
PROGRAM :
OUTPUT:
OUTPUT:
5 . ALGORITHM ARRANGERMENT: sorting the value of elements from smallest to
bigest .
Data representation : Program including :
Int [] a
Int n : the number of elements wanting to add on array
PROGRAM :
OUTPUT:
OUTPUT:
III. Programming paradigms
1 .Procedure Programming
Each program can also be divided into many other subroutines to simplify their work.
To make it easy to understand, in structured programming, the program will be divided into
many subfunctions and called in the main function. Some structure-oriented languages like
C, Pascal...
Example :
A .METHODS:
In this tutorial, we will spare some time and discuss functions. In java, a method is the same
as a function. All the functions must be defined within a class. By that, we can summarize by
defining a Java method as a function belonging to a class. A function is a named unit of code
that can be invoked anywhere in the class.
Syntax of a function
▪ Access specifier – this shows the scope of availability of a fuction. ‘Public’ means that
the function can be called from aywhere in the program. We have other access
specifiers such as private and protected.Protected, the method can only be called within
the class and its subslcasses. Private can oly be called inside the class
▪ Modifier – ‘static’ is optional in a fuction defination. In this case static means the
function is a not an object of the main class but a method that belongs to the main class.
▪ Retur type – We have functions that return a value and functions that do not return
anything. Void, means that the function does not have a return value. If the fuction was
to return a value, replace void with the data type of the returned value.
▪ Parameter list – it informs the compiler about the data type it will receive and the
value to be returned.
FOR EXAMPLE :
public static void Export(int[] a , int n){}:
EXAMPLE 2:
I have created an one dimensional array named A , n is the number of elements of the array .
Immediately after entering all the data for the elements then I called the “export” function to
output all the data entered to the screen.
CONCLUSION:
Key Features of Procedural Programming
• Local Variable: A local variable is a variable that is declared in the main structure of
a method and is limited to the local scope it is given. The local variable can only be
used in the method it is defined in, and if it were to be used outside the defined
method, the code will cease to work.
• Modularity: Modularity is when two dissimilar systems have two different tasks at
hand but are grouped together to conclude a larger task first. Every group of systems
then would have its own tasks finished one after the other until all tasks are complete.
Procedural Programming comes with its own set of pros and cons, some of which are
mentioned below.
Advantages
Disadvantages
FOR EXAMPLE :
The following program will denote the nature and functionality of procedural
programming
PROGRAM :
OUTPUT:
Then , I initialize the do-while loop to print out the menu and input the variable “chon”.
System will re-print out the menu and record the value of varibale “chon” after executed
the function before.
Next using Switch-case statement to drive system to function which illustrated by the
variable “chon”.
A class is an abstract blueprint used to create more specific, concrete objects. Classes often
represent broad categories, like Car or Dog that share attributes. These classes define what
attributes an instance of this type will have, like color, but not the value of those attributes for
a specific object.
Classes can also contain functions, called methods available only to objects of that type.
These functions are defined within the class and perform some action helpful to that specific
type of object.
For example, our Car class may have a method repaint that changes the color attribute of our
car. This function is only helpful to objects of type Car, so we declare it within the Car class
thus making it a method.
Class templates are used as a blueprint to create individual objects. These represent specific
examples of the abstract class, like myCar or goldenRetriever. Each object can have unique
values to the properties defined in the class.
For example, say we created a class, Car, to contain all the properties a car must
have, color, brand, and model. We then create an instance of a Car type object, myCar to
represent my specific car.
We could then set the value of the properties defined in the class to describe my car, without
affecting other objects or the class template.
a/
Object
This is the basic unit of object-oriented programming. That is both data and function that
operate on data are bundled as a unit called an object.
Class
When you define a class, you define a blueprint for an object. This doesn't actually define
any data, but it does define what the class name means, that is, what an object of the class
will consist of and what operations can be performed on such an object.
OOP has four basic concepts on which it is totally based. Let's have a look at them
individually −
Books : class name .
Id , name , author , language , …. are properties
Private , public , protected are access modifiers
private - Only the current class will have access to the field or method.
protected - Only the current class and subclasses (and sometimes also same-package
classes) of this class will have access to the field or method.
public - Any class can refer to the field or call the method.
Public Books(){} : constructor is a block of codes similar to the method. It is called when an
instance of the class is created. At the time of calling constructor, memory for the object is
allocated in the memory.
Access Modifier: Defines the access type of the method i.e. from where it can be accessed in
your application. In Java, there are 4 types of access specifiers:
protected: Accessible within the package in which it is defined and in its subclass(es)
(including subclasses declared outside the package).
default (declared/defined without using any modifier): Accessible within the same class
and package within which its class is defined.
The return type: The data type of the value returned by the method or void if it does not
return a value.
Method Name: The rules for field names apply to method names as well, but the convention
is a little different.
Parameter list: Comma-separated list of the input parameters that are defined, preceded by
their data type, within the enclosed parentheses. If there are no parameters, you must use
empty parentheses ().
Exception list: The exceptions you expect the method to throw. You can specify these
exception(s).
Method body: It is the block of code, enclosed between braces, that you need to execute to
perform your intended operations.
Message Passing: Objects communicate with one another by sending and receiving
information to each other. A message for an object is a request for execution of a procedure
and therefore will invoke a function in the receiving object that generates the desired results.
Message passing involves specifying the name of the object, the name of the function and the
information to be sent.
Now that we have covered the basic prerequisites, we will move on to the 4 pillars of OOPs
which are as follows. But, let us start by learning about the different characteristics of an
Object-Oriented Programming Language.
a)Encapsulation
Encapsulation is achieved when the object of the class maintains the private state. Other
objects are not allowed to access these objects; despite that, the other objects can only access
or invoke the list of public functions.
In simple words, encapsulation means wrapping the data, methods into the class, i.e., into a
single unit. Encapsulation automatically accepts the data hiding by making variables private
and access them with the help of methods that are public. Access modifiers are used to
accomplished data hiding.
EXAMPLE:
PROGRAM
OUTPUT:
b)Abtraction:
Abstraction in OOP is used to collect more detail and show the only appropriate amount of
the object’s attributes. The primary purpose of Abstraction in OOP is to hide unnecessary
information from the outside world. That helps in reducing the effort and complexity in
programming. Fetching, removing, and selecting the user information is known as
Abstraction. Programmers can use the same data and information for other instances and
programs with a few changes or no modifications.
EXAMPLE:
c): Encapsulation
It is defined as the wrapping up of data under a single unit. It is the mechanism that binds
together the code and the data it manipulates. Another way to think about encapsulation is
that it is a protective shield that prevents the data from being accessed by the code outside
this shield.
Technically, in encapsulation, the variables or the data in a class is hidden from any other
class and can be accessed only through any member function of the class in which they are
declared.
In encapsulation, the data in a class is hidden from other classes, which is similar to what data-
hiding does. So, the terms “encapsulation” and “data-hiding” are used interchangeably.
Encapsulation can be achieved by declaring all the variables in a class as private and writing
public methods in the class to set and get the values of the variables.
EXAMPLE :
d): Inheritance
Subclass: The class that inherits the other class is known as subclass (also known as derived
or extended or child class). The subclass can add its own fields and methods in addition to the
superclass fields and methods.
Reusability: Inheritance supports the concept of “reusability”, i.e. when we want to create a
new class and there is already a class that includes some of the code that we want, we can
derive our new class from the existing class. By doing this, we are reusing the fields and
methods of the existing class.
EXAMPLE:
PROGRAM:
Pillar 4: Polymorphism
1.Overloading
2. Overriding
Example 1:
Overloading:
Method Overloading allows different methods to have the same name, but different signatures
where the signature can differ by the number of input parameters or type of input parameters,
or a mixture of both.
Method overloading is also known as Compile-time Polymorphism, Static Polymorphism,
or Early binding in Java. In Method overloading compared to parent argument, child
argument will get the highest priority.
Overriding :
Method overriding is one of the way by which java achieve Run Time Polymorphism.The
version of a method that is executed will be determined by the object that is used to invoke it.
If an object of a parent class is used to invoke the method, then the version in the parent class
will be executed, but if an object of the subclass is used to invoke the method, then the version
in the child class will be executed. In other words, it is the type of the object being referred
to (not the type of the reference variable) that determines which version of an overridden
method will be executed.
EXAMPLE:
OUTPUT :
c/
Benefits of OOP
• We can build the programs from standard working modules that communicate with one
another, rather than having to start writing the code from scratch which leads to saving
of development time and higher productivity,
• OOP language allows to break the program into the bit-sized problems that can be
solved easily (one object at a time).
• The new technology promises greater programmer productivity, better quality of
software and lesser maintenance cost.
• OOP systems can be easily upgraded from small to large systems.
• It is possible that multiple instances of objects co-exist without any interference,
• It is very easy to partition the work in a project based on objects.
• It is possible to map the objects in problem domain to those in the program.
• The principle of data hiding helps the programmer to build secure programs which
cannot be invaded by the code in other parts of the program.
• By using inheritance, we can eliminate redundant code and extend the use of existing
classes.
• Message passing techniques is used for communication between objects which makes
the interface descriptions with external systems much simpler.
• The data-centered design approach enables us to capture more details of model in an
implementable form.
While it is possible to incorporate all these features in an OOP, their importance depends
upon the type of project and preference of the programmer. These technology is still
developing and current products may be superseded quickly.
Developing a software is easy to use makes it hard to build.
Disadvantages of OOP
• The length of the programmes developed using OOP language is much larger than the
procedural approach. Since the programme becomes larger in size, it requires more
time to be executed that leads to slower execution of the programme.
• We can not apply OOP everywhere as it is not a universal language. It is applied only
when it is required. It is not suitable for all types of problems.
• Programmers need to have brilliant designing skill and programming skill along with
proper planning because using OOP is little bit tricky.
• OOPs take time to get used to it. The thought process involved in object-oriented
programming may not be natural for some people.
• Everything is treated as object in OOP so before applying it we need to have excellent
thinking in terms of objects.
EXAMPLE :
import java.io.*;
class OOPS {
public static void main(String[] args)
{
System.out.println("GfG!");
class Animal {
String name;
public void run()
{
System.out.println("Animal is running!");
}
}
/// the class dog is the child and animal is the parent
String color;
public void bark()
{
System.out.println(name + " Wooh ! Wooh !"
+ "I am of colour " + color);
}
}
String pattern;
3. Event-driven programming
EXAMPLE:
4.the relationship between programming paradigms
In structured programming, the problem is taken, and analyzed from top to bottom, when
you find a logical situation too complex, you try to divide it into parts (like pizza slices).
The idea is to divide the logical complexity into functions or procedures that are easy to
understand and solve. The classic, divide and win.
If properly worked, functions or procedures will appear that are reused in different parts of
the code.
With OOP, on the other hand, the approach is to discover the elements involved in the
problem (people, documents, products, etc.) by analyzing the data (properties) that each one
manages, together with the methods (which are nothing other than functions or methods).
Then, you create derived classes (sub-classes) of the main classes (for example of people:
employees, suppliers, customers, etc.) that reuse the methods and properties of the main
class (inherit) and add the specific ones.
Personally, I use a combination of these three paradigms. But in any case, it depends on
what type of program is being solved.
Object oriented:
1. Main focus is on 'data security'. Hence, only objects are permitted to access the
entities of a class.
2. Entire program is divided into objects.
3. Access specifier are "public", "private", "protected".
4. Inheritance achieved in three modes public private and protected.
Procedural oriented:
1. Main focus is on "how to get the task done" i.e. on the procedure or structure of a
program
2. Large program is divided into units called functions.
3. No access specifier observed.
4. Their is no provision of inheritance.
II.DEMO
In this demo, continuing from problem analysis in as1, I apply the knowledge of basic
programming combined with object-oriented programming to design a Book
management software for the company.
I will write a program to manage the students in my class. The program includes the following
main functions:
-import: With this function, users can add Book input from the keyboard.
-export : with this function , users can see the information about books
2.Analysis problem
When running program , system will print out “ how many elements do you want”
And you have to input all the information about object .
Here is main menu of program and you have 2 option . 1 is Books managerment , 2 . tools
managerment
3 . exit
When choosing 1 , system will execute menuBooks() and print out the below menu :
When choosing 2 , system will execute menuTools() and print out the below menu:
3.Program solving
1. Books{}:
2. Testbooks{}
Class Testbooks has 2 properties are n ( type : integer ) and list(type : Bools[])
And 7 methods in menu book.
3. Tools{}
Class Tools has 2 properties are n ( type : integer ) and list(type : Bools[])
And 6 methods in menu Tools.
3.2 Coding và execute
a) Books manegement
1.input()
PROGRAM:
OUTPUT:
1. Inport Books();
PROGRAM
OUTPUT:
2.export{}
OUTPUT:
3.delete{}
OUTPUT:
4.look for{}
OUTPUT:
5.edit{}
PROGRAM:
OUTPUT:
6.exit{}
OUTPUT:
b)Tools manegements:
1. Find by author{}
OUTPUT:
2.find by name{}
OUTPUT:
3 . find by spices{}
OUTPUT:
4.findBylanguage{}
OUTPUT:
5.sortbycost{}
OUTPUT:
4.DEBUGGING
Start the local debugger by either using the keyboard shortcuts of Ctrl + F5 or Ctrl + Shift +
F5 or using the Debug menu or selecting ‘Debug‘ on right clicking the project in the Projects
window
4.4
Press F8 to let the control flow normally, F7 to go into a method, Ctrl + F7 to come out of a
block, F5 to let the control flow till next breakpoint, F4 to run to cursor and Shift + F5 to end
the show.
III. Debug process
With netbean, you put the mouse pointer on the command line to set as a breakpoint and click
to form a pink line like the image above.
Then go to menu Debug > Debug Project. Debug interface appears as follows:
IV. Coding standard
Different modules specified in the design document are coded in the Coding phase according
to the module specification. The main goal of the coding phase is to code from the design
document prepared after the design phase through a high-level language and then to unit test
this code.
Good software development organizations want their programmers to maintain to some well-
defined and standard style of coding called coding standards. They usually make their own
coding standards and guidelines depending on what suits their organization best and based on
the types of software they develop. It is very important for the programmers to maintain the
coding standards otherwise the code will be rejected during code review.
A coding standard gives a uniform appearance to the codes written by different engineers.
It improves readability, and maintainability of the code and it reduces complexity also.
These rules tell about which types of data that can be declared global and the data that can’t
be.
For better understanding and maintenance of the code, the header of different modules should
follow some standard format and information. The header format must contain below things
that is being used in various companies:
Modification history
Different functions supported in the module along with their input output parameters
Naming conventions for local variables, global variables, constants and functions:
Meaningful and understandable variables name helps anyone to understand the reason of
using it.
Local variables should be named using camel case lettering starting with small letter (e.g.
localData) whereas Global variables names should start with a capital letter (e.g. GlobalData).
Constant names should be formed using capital letters only (e.g. CONSDATA).
The names of the function should be written in camel case starting with small letters.
The name of the function must describe the reason of using the function clearly and briefly.
Indentation:
Proper indentation is very important to increase the readability of the code. For making the
code readable, programmers should use White spaces properly. Some of the spacing
conventions are given below:
There must be a space after giving a comma between two function arguments.
Proper Indentation should be there at the beginning and at the end of each block in the
program.
All braces should start from a new line and the code following the end of braces also start
from a new line.
All functions that encountering an error condition should either return a 0 or 1 for simplifying
the debugging.
On the other hand, Coding guidelines give some general suggestions regarding the coding
style that to be followed for the betterment of understandability and readability of the code.
Some of the coding guidelines are given below :
Code should be easily understandable. The complex code makes maintenance and debugging
difficult and expensive.
Each variable should be given a descriptive and meaningful name indicating the reason behind
using it. This is not possible if an identifier is used for multiple purposes and thus it can lead
to confusion to the reader. Moreover, it leads to more difficulty during future enhancements.
The code should be properly commented for understanding easily. Comments regarding the
statements increase the understandability of the code.
Lengthy functions are very difficult to understand. That’s why functions should be small
enough to carry out small work and lengthy functions should be broken into small ones for
completing small tasks.
GOTO statement makes the program unstructured, thus it reduces the understandability of the
program and also debugging becomes difficult.
Advantages of Coding Guidelines:
Coding guidelines increase the efficiency of the software and reduces the development time.
Coding guidelines help in detecting errors in the early phases, so it helps to reduce the extra
cost incurred by the software project.
If coding guidelines are maintained properly, then the software code increases readability and
understandability thus it reduces the complexity of the code.
V.Coding editer
1.Definition
Text Editor does not have a built-in compiler or interpreter inside it, which means that to run
the application, you must use an external compiler separately. These Text Editors are often
used for web application development, such as Sublime text, Atom, Bracket, Notepad++,
Vscode, …
VI.Using IDE
Developers use numerous tools throughout software code creation, building and testing.
The IDE has a built-in compiler or interpreter inside it that helps you execute code directly
while programming applications, such as Visual Studio, Esclipe, Xcode, Android studio, …
Throughout the process of writing, creating, and testing software, developers employ a variety
of tools. Text editors, code libraries, bug tracking software, compilers, and test platforms are
among the most common development tools. A developer who does not use an IDE has to
choose, deploy, integrate, and monitor these tools individually.
Most IDE capabilities, such as intelligent code completion and automatic code creation, are
designed to save time by eliminating writing out complete character sequences. The integrated
toolset aims to make software development easier while also detecting and reducing code
errors and typos.
Other popular IDE features assist developers in streamlining their workflow and problem-
solving. IDEs parse code as it is written, identifying problems caused in real time. Most IDEs
also include syntax highlighting, which employs visual clues to discern grammar in the text
editor.
1.Download
In the Installers section, choose to download according to your platform, here I use Windows
so I will choose the platform as Windows
Select the link after the line We suggest the following mirror site for your download
Right-click the NetBeans IDE icon after the download has finished and choose Run as
administrator.
The settings interface pops up showing the supported programming languages. You can go to
Customize to choose more or less languages. Select Next to continue the installation process.
Check the box I accept the terms in the license agreement and select Next.
The installer will automatically find where to install the NetBeans IDE and locate the newly
installed JDK. If you want to change the installation drive, you can change it back by selecting
Browse and choosing where you want to install. Then select Next to continue the installation
process.
Check the Check for Update check box to check if NetBeans has an updated version
immediately. Select Install to proceed with the installation.
Select Finish to finish the installation of NetBeans IDE.
Click Finish.
3.create a new class
Right-click on the Source Packages folder and select New -> Java Package. Enter your
webmail user name for the name of the project
Right-click the user name package and select New -> Java Package...
Name your class Menu. Choose Finish.
Conclution
VII. REFERENCES