Skip to content

Commit 76993fd

Browse files
authored
Create HelloWorld.md
1 parent df3e6a7 commit 76993fd

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

HelloWorld.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Lab 1 Hello World
2+
3+
## Instructions:
4+
- OPEN BlueJ,
5+
- CREATE a new BlueJ project titled HelloWorld in your Computer Science folder (H:\Computer Science),
6+
- CREATE and open a new class,
7+
- DELETE BlueJ's starter code, and
8+
TYPE in our code skeleton:
9+
```
10+
//Name:
11+
//Period:
12+
public class HelloWorld
13+
{
14+
public static void main(String[] args)
15+
{
16+
//code goes here
17+
}
18+
}
19+
```
20+
21+
22+
## CHALLENGES
23+
24+
Prior to completing a challenge, insert a COMMENT with the appropriate number. A comment is added with two slashes: //. These lines of code are “invisible” to the compiler. They’re for your benefit - the computer doesn't see them.
25+
26+
1) The syntax for Java programming is confusing at first! While this class doesn't have an official textbook, you do have access to a comprehensive series of Google slides that will help!
27+
28+
2) Write the code to print:
29+
```
30+
Hello World!
31+
```
32+
3) Write the code to print (this text is on two lines):
33+
```
34+
Hello
35+
World!
36+
```
37+
4) Write the code to print (note the blank line between words!):
38+
```
39+
Hello
40+
41+
World!
42+
```
43+
5) Write the code to print:
44+
```
45+
*************
46+
*** Hello ***
47+
*** World ***
48+
*************
49+
```
50+
6) With ONE PRINT and ONE PRINTLN STATEMENT, write the code to print:
51+
```
52+
Hello World!
53+
```
54+
7) With ONE PRINTLN STATEMENT PER LINE, write the code to print:
55+
```
56+
###
57+
# #
58+
###
59+
```
60+
8) With THREE PRINTLN STATEMENTS and ONE PRINT STATEMENT, write the code to print your name to the screen three times, like this (assuming your name is Sarah):
61+
```
62+
Sarah, Sarah
63+
Sarah
64+
```
65+
66+
9) With ONE PRINTLN STATEMENT and TWO PRINT STATEMENTS, write the code to print:
67+
```
68+
Something Something SOMETHING
69+
```
70+
10) Write the code to print the following:
71+
```
72+
Java is
73+
cool
74+
!
75+
```
76+
11) Write the code to print the first letter of one of your names to the console, like this:
77+
```
78+
***
79+
* *
80+
* *
81+
***
82+
* *
83+
* *
84+
***
85+
```
86+

0 commit comments

Comments
 (0)