12/16/2023 0 Comments Blue jay java download![]() ![]() The name of the object is called simpleOp1, and the value of x and y (the are known as a and b in the parameters) are set to 10 and 20 and the sum is 30 Press ok and you see the result appears in a terminal window. ![]() In this example, we only created one constructor but you can create several constructors in a class as long as their input parameters are different from each other To run the program, right click on the SimpleOperationTest class and select new SimpleOperationTestġ4 The system creates an object for you and gives it a default name: in this case it is called simpleOp1 Give 10 to the value of a and 20 to the value of b and press OKġ5 A new object is created. You need to fix all your errors until your program compiles with no error and then you can run your program.Įxecution starts from one of you constructors. Every time you correct an error or a set of errors, you need to recompile the program. So, you may need to remove the quotations and re-type them so the Blue jay compiler does not complain.ġ2 If you make a mistake, (example: missing a semi colon ( ) or a bracket or a typo), you can always click on the “?” button in the status window to get more help for your syntax errors. In some cases the double quotation character (“) at the beginning and the end of the statements may not be the same as the double quotation character of Blue jay editor. However, sometimes it may become a bit challenging to find your syntax error.ġ1 Note: Note that some of you may like to type this in a text file and then copy and paste it in the Blue Jay editor. Usually, the compiler is good in reporting your error. Syntax error is reported if you make a mistake. So to compile the code, click the compile buttonġ0 If you have typed everything correctly, you will see “Class compiled – no syntax errors” on the status window at the bottom. The reason we need to compile a program is to make sure that syntactically the program is correct and contains no error. Do not miss quotations, “ ”, “,” or anything else that is there. This helps you to understand your code if you refer to it later Now to do your first exercise, type the code that is shown in the next slide The java code is case sensitive. It is not required for this course Also make sure that any program that you develop, you write the description of the program there. You can delete the version number section. This indicates that this program is being developed by you. As we will learn later in the course, comments are non-executable code and programmers add them in order to document their codeħ Any program that you write for your assignments, you need to put the due date of the assignment and your name in there. ![]() Note that Blue Jay generates some default code for your SimpleOperationTest class All of the blue code are comments. ![]() This opens an editor window where you can write and modify your java code. Now open the SimpleOperationTest by double clicking on it. Note that the strips mean that the class has not been compiled yetĦ Now open the SimpleOperationTest by double clicking on it This shows the SimpleOperationTest class in the window as follows. Write the Class name to be: SimpleOperationTest and click OK Note that there should not be any space between the name you choose. This should create a folder called project1 under your desktop directory Under your desktop directory, “ …./desktop/”, type project1 (“…./desktop/project1”). You should see a large window as shown in the following pictureĤ Under your desktop directory, “ …. 2 Start Blue Jay by double clicking on the short cut that appears on your desktop ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |