Aug 11, 2014

7. Scrapbook

Since we are dealing with building blocks for the next few tutorials, it is not important to write entire applications with the class and main. This is done with a Java Scrapbook.




To create a Scrapbook, create a new project, which will contain the Scrapbooks, or just use the last used project. We have to use File New and Other.




Next, we have to double click Java so it will show more options under that folder.




In the Java Run/Debug subfolder, select Scrapbook Page. In the next, we set the name, such as ex7.




A simple java program is written. Next all text is selected, and the Execute the Selected Text toolbar is clicked. This toolbar should be near the top-right portion of screen.


// ex7.jpage
int a = 1;
int b = 3;
System.out.println("Sum = " + (a+b));
System.out.println("Difference = " + (a-b));





No comments:

Post a Comment