Java Fragmented operations

Source: Internet
Author: User

Shortcut keys:

Window--Preferences-Kekys: custom shortcut keys
1.alt +/: Content Tips
2.Ctrl + 1: Quick fix
3.Ctrl + SHIFT + O: Guide pack
4.alt + Direction key: Forward and backward, to view the source time to use
5.ctrl + SHIFT +/: Add a previous comment
6.ctrl + SHIFT + \: Remove Comment
7.ctrl + SHIFT + F: Content format
8.ctrl + SHIFT + x: Change to uppercase
9.ctrl + Shift + Y: Change to lowercase
10.ctrl + ALT + DOWN ARROW: Copy a line of code
11.alt + up down arrow: Move code
12.ctrl + t: View inheritance relationships for classes
13.ctrl + SHIFT + T: View Source code
14.ctrl + SHIFT + L: View all shortcut keys
15.ctrl + H: Find words

To modify the encoding format:

1.window--Preferences---workspace-->text file encoding: Entire software
2.alt+ ENTER: A single Java file modifies the encoding format

To reset a window:

Window--Reset perspective

Junit:
@Test: Using the JUnit test class
@Before: Test method to initialize variables before running
@After: Releasing resources after the method finishes
@BeforeClass: Class is initialized when it is loaded.
@AfterClass:
Before------afer---before----eat
Beforeclass-----eat--Afterclass

Assert: Assert
Assert.assertequals ("1", P.run ())---Test run () method, expecting to return 1
Assert.assertarrayequals (New Int[]{1,1},new int[]{1,2})--determine if two arrays are equal

Java Fragmented operations

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.