【笔记】Eclipse and Java for Total Beginners—003

Lesson 03 – Use Eclipse Scrapbook

  • Introduce Eclipse Scrapbook
  • Introduce Java expressions, statements
  • Discuss Java packages
  • Create Person Object in Scrapbook

1. 打开Scrapbook

    RC project / New / other / Java / Java Run/Debug / Scrapbook.page / Next / MyScrapbook (name) / Finish.

2. Scrapbook的作用

    Scrapbook allows you to run snippets of Java code and see the result.

3. Inspect and Execute

    Inspect is for expressions.

    Execute is for statements.

4. Package need import.

  
    
1 Person p = new Person();
2 p.setName( " Fred " );
3 p.setMaximumBooks( 10 );
4 p.getMaximumBooks()

你可能感兴趣的:(eclipse)