Java Eclipse new Java file automatically generates main function, console output line number is no longer restricted

Source: Internet
Author: User

First, the new Java file automatically generates the main function

Although it is only a simple thing, but it should still be someone do not know, each new Java file to manually enter public static void main (String args[]) {}, it is very troublesome, in fact, eclipse can automatically generate this line, Only most Java files have no main function, so this line is closed by default,

Right-click src under Java Project to select New->class to create a new class


Then on the pop-up dialog box automatically generate the main function, click Confirm, in the production of Java files have the main function


Second, Eclipse console output line number is no longer restricted

Eclipse in order to avoid the dead cycle brush screen also in order to comply with the Windows console habit, when the console output more than a certain amount of running results, will automatically roll over the above control results, but sometimes our output is very long, such as printing 200,000 planetary pyramid, Process handles 200,000 files and so on. We must present the entire result to the console. Do not want to write code control output to the file again.

You can choose Windows->preferences


In the popup dialog, look for the Console tab, remove the limit console output in the console to get the entire output, then copy and paste it into Notepad!



Java Eclipse new Java file automatically generates main function, console output line number is no longer restricted

Related Article

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.