Practical work №1
Step 1
Start the NetBeans IDE using the icon on your desktop
Picture 1
Step 2
In the window that opens, run the command File => Create project
Step 3
Select the categories and projects as indicated in the figure and click Next
Picture 2
Step 4
Change the Project name field, as indicated below Myfirstproject and then click Finish
Picture 3
Step 5
In the code editor that opens, you will see the following code:
Picture 4
Step 6
Enter the code as shown on the picture below:
Picture 5
Step 7
Press Shift + F6
Step 8
At the bottom of the window you will see the following
Picture 6
Additional tasks
1. Create a method that defines a maximum of two numbers.
System.out.println("max = "+maxOfTwoNumbers(0, -99));
Picture 7
2. Create a method allowing to calculate the 3rd degree of the number
System.out.println ("7 * 7 * 7 =" + Cube (7));
Picture 8
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.