Skip to content

Commit 4d252f6

Browse files
authored
Create MyAwesomProgram.java
1 parent 20ee927 commit 4d252f6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// We make field definitions not at the class level but at the object level
2+
// Notice the user is defined within a method
3+
public class MyAwesomeProgram
4+
{
5+
public static void main(String [] args)
6+
{
7+
User user = new User();//not a field not a class but a loc var to the main meth
8+
user.firstName= "Bob";
9+
user.lastName= "Smith";
10+
}
11+
}

0 commit comments

Comments
 (0)