Introduction to Java Programming tools

Source: Internet
Author: User

Basic configuration of the Eclipse workspace
A: Program compilation and operation of the environment configuration (generally do not change)
Window--Preferences--Java
Compilation environment: Compiler the highest version is selected by default.
Operating environment: Installed JREs will find the JDK you installed by default. We recommend that you configure the environment variables for Java.
Problem:
Low compile, high run. OK.
High compilation, Low run. No.
It is recommended that you compile and run the same version.
B: How do I get rid of the default annotations?
Window--Preferences--Java--code Style--code Templates
Select the content you do not want and edit it by editing it on the right.
Note: Please delete only the comments section, not the comments section.
C: Display and hide of line numbers
Display: In the left-most blank area of the code area, right-show line numbers.
Hide: Do the above action again.
D: Font size and color
A:java the font size and color of the code area:
Window--Preferences--general--appearance--Colors and Fonts--java Modify--Java Edit Text Font
B: Console
Window--Preferences--general--appearance--Colors and Fonts--Debug--Console font
C: Other documents
Window--Preferences--general--appearance--Colors and Fonts--Basic--Text Font
E: The form to mess up, how to do?
Window--Reset perspective
F: The console can't find it, what should I do?
Window--show View-console
G: Remove hover hint
Window--Preferences--java--editor--hovers. On the right, remove the combined hover hook.
The floating box of the code does not appear automatically. If you want to see a hint, hover your cursor over the code and press F2.

Use of content secondary keys in eclipse
a:alt+/Cue function
b:main+alt+/,syso+alt+/, give other hints
C: Add Output statement, select the part that needs output, alt+/Select the last item
C: Define your own ALT +/
Windows--perference-java-editor-templates--new

Use of shortcut keys in eclipse
A: New CTRL + N
B: Formatted ctrl+shift+f
C: Import Package Ctrl+shift+o
D: Comment ctrl+/,ctrl+shift+/,ctrl+shift+\
E: Move the code up or down the selected code ALT + up/down arrows
F: Check the source code selected class name (F3 or CTRL + mouse click)
G: Find the specific class CTRL + SHIFT + T
H: Specific ways to find specific classes CTRL + O
I: Give advice to ctrl+1, generate the left data type according to the right, generate method
J: Remove Code CTRL + D
K: Extraction method ALT + SHIFT + M
L: Renaming ALT + SHIFT + R

How to delete projects and import projects in eclipse
A: Delete Items
Select Item – Right-click – delete
Remove from Project area
Remove from hard disk
B: Import Project
Right-click in the project area to find the import
Find general, expand, and find
Existing Projects into Workspace
Click Next, then select the item you want to import
Note: The project name is selected here

Basic use of Eclipse break point debugging
The role of A:debug
Debug program
View program Execution Flow
B: How to view the program execution process
What is a breakpoint:
is a marker, where to start.

How to set Breakpoints:
Where you want to see the program, you just double-click on the left side of the active program.
  
Where to set breakpoints:
where not to point.
Currently: we add on the first valid statement of each method.

How to run a program after you set a breakpoint:
Right--Debug as--Java application

See which places:
Debug: Where to test breakpoints
In this place, remember the F6, or click also can. See the execution of a row at a time.
Variables: Viewing variable variations of a program
Fordemo: The source file being viewed
Console: Consoles

How to go to breakpoints:
A: Double-click again
B: Find the debug view, variables interface, find breakpoints, and click, then see all the breakpoints, and finally click on that double fork.


The ToString () method of the object class
A: Case Demo
Public String toString ()
A: Returns the string representation of the object.


Public stirng toString () {
Return name + "," + age;
}
B: Its value is equal to:
GetClass (). GetName () + "@" + integer.tohexstring (hashcode ())
C: Since the data by default is meaningless to us, it is generally recommended to override this method.
B: Final version
Automatically generated

The Equals () method of the object class
A: Case Demo
A: Indicates whether another object is "equal" to this object.
B: By default, the reference to the object is the same.
C: It is generally recommended to override this method because the reference to the comparison object is meaningless.

The difference between the = = number and the Equals method
= = is a comparison operation symbol that either compares the base data type or compares the reference data type, the base data type compares the value, and the reference data type compares the address value
The Equals method is a method that can only compare reference data types, all of which inherit methods from the object class, and if the Equals method in the object class is not overridden, the Equals method and the = = number Compare reference data types without distinction. The overridden Equals method compares a property in an object

Introduction to Java Programming tools

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.