We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20ee927 commit 4d252f6Copy full SHA for 4d252f6
Classes/Fields2Class/MyAwesomProgram.java
@@ -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