Sie sind auf Seite 1von 2

Integrated Development Environment (IDE)

A software suite that consolidates basic tools required to write and test software.
An IDE brings many of those development-related tools together as a single framework, application
or service. (text editors, code libraries, compilers and test platforms)
Without an IDE, a developer must select, deploy, integrate and manage all of these tools separately.
The integrated toolset is designed to simplify software development and can identify and minimize
coding mistakes and typos.
Through an IDE's interface, a developer or team of developers can compile and execute code
incrementally and manage changes to source code in a uniform manner.
Because of the IDE's Compile on Save feature, you do not have to manually compile your project in
order to run it in the IDE. When you save a Java source file, the IDE automatically compiles it.

Common features of IDE’s

An IDE typically contains the following:

a) code editor
- where the user writes and edits source code
- Source Code – fundamental component of a computer program that is created by a programmer.
b) a compiler or interpreter
- translates the source code into a readable language that is executable for a computer
c) debugger
- tests the software to solve any issues or bugs.
d) graphical user interface (GUI)
- contains GUI element defined as a class widget from which you can create object instances for
your application.

Components of the NetBeans Project IDE.

a) Projects Window
- the command center for your project.
- contains a tree view of the components of the project, including source files, libraries that your
code depends on, and so on.
b) Source Editor Window
- the central area of the IDE where you write and generate code. The Source Editor is actually a
collection of different types of editors with different purposes. There are text editors for different
types of files, such as Java, JSP, XML, HTML, and plain text files.
c) Navigator Window
- use to quickly navigate between elements within the selected class.

Java.util.Scanner

java.util.Scanner is a class in the Java API used to create a Scanner object, an extremely versatile object that
you can use to input alphanumeric characters from several input sources and convert them to binary data..

The Scanner
A Scanner object can parse user input entered on the console or from a file. A Scanner breaks its input
into separate tokens (which are typically separated by white space), and then returns them one at a
time. The scanner provides methods to convert the tokens into values of different types. For example,
this code reads two numbers from the console and prints their sum:
Scanner in = new Scanner(System.in);
int i = in.nextInt();
int j = in.nextInt();
System.out.println(i+j);
Creating Scanners
Whenever using scanners, be sure to include the proper import line:
import java.util.Scanner;
We will create scanners in two ways:
1. To read from the console, use the following:
Scanner input = new Scanner(System.in);
2. To read from a file, use the following:
Scanner input = new Scanner(new FileStream("filename.txt"));

Scanner Methods

Das könnte Ihnen auch gefallen