Java Get input

Source: Internet
Author: User

Receive keyboard input data, save in variable:

First Import Scanner package: Import Java.util.Scanner;

New Scanner Object Input:scanner input = new Scanner (system.in);

Save the input data to a variable: int score = Input.nextint (); Input as a class object, Nextint () is its member function

Debugging under Eclipse

The first step: Learn what the Eclipse Debug icon means:
Step into single entry-continues execution within the execution method. F5
Step over stepping forward-perform next step. F6
Step return– Step out-jumps out of the method being executed.
Drop to frame– jumps to the first sentence of the method being executed.
Resume: Executes to the next breakpoint.
Terminate: Stop Debugging. The program will stop running.
Step two: At run time, you can select a variable and then use: Watch. You can see the value of this variable in the expressions window.
Step three: In the Breakpoints view, you can use the Remove all breakpoints to clear all breakpoints at once.
Fourth step: Right click on the upper right corner of the recessed debug button, select "Close"
Fifth step: After saving, close.

Java Get input

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.