Podcast
Questions and Answers
What should you do to create a new project in BlueJ?
What should you do to create a new project in BlueJ?
After creating a new class, how do you compile it?
After creating a new class, how do you compile it?
When naming your project, what format must you follow?
When naming your project, what format must you follow?
Which action must be performed to run the main method in BlueJ?
Which action must be performed to run the main method in BlueJ?
Signup and view all the answers
What should be removed from the editor after creating a new class?
What should be removed from the editor after creating a new class?
Signup and view all the answers
Study Notes
Java Programming Using BlueJ
-
Java programming is being taught using the BlueJ software.
-
BlueJ version 4.2.2, supported by Oracle, is used for compiling and running Java applications.
-
Create a folder named Surname_FirstName ICT9 in drive D for project files.
-
Run BlueJ by double-clicking the icon on the desktop or from Start > All Programs > BlueJ > BlueJ.
-
To create a new project, click Project > New Project.
-
In the new project dialog, type in the project name and select the desired location (the folder in drive D).
-
Select the project folder in the location dialog.
-
Create a project named Surname_ICT9_section
-
The BlueJ window will display a similar panel for creating new projects.
-
To create a new class:
- Click the New Class button.
- Type the class name (e.g., MT2_1_datatypes_Surname).
- Select the class type.
- Click OK.
-
The new class will appear in the BlueJ window.
-
Compile the class by right-clicking the class and selecting Compile.
-
Errors are cleared if the compilation is error-free.
-
Open the class file and remove the sample text, inputting your own values.
-
Example of the class code:
- public class MT2_1_datatypes_Dinglasan {
- public static void main(String[] args) {
- String FN = "Dinglasan, Cristy";
- char mi = 'R';
- String gs = "G9-St. Francis";
- byte age = 15;
- short by = 2009;
- int PN = 919123456;
-
Right-click on the class.
-
To check the syntax, choose the Compile option.
-
Execute the program by Right-clicking the class
-
Select void main(String[] args)
-
Click OK.
-
The terminal window will display the output
-
The path to the project folder is specified.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers the basics of Java programming using the BlueJ software. You'll learn how to set up projects, create classes, and compile Java applications effectively. Ideal for beginners looking to enhance their Java skills.