uni

Thing1's amazing uni repo
Log | Files | Refs

27.01.26.md (509B)


      1 # 27/01/26
      2 
      3 # classes
      4 
      5 - a class is a blueprint for a specific object
      6 - generally objects start with uppercase letters
      7 
      8 # class diagrams
      9 
     10 - '-' minus means private
     11 - '+' plus means public
     12 
     13 # java
     14 
     15 - the name of the 'main' class must be the name of the file
     16 
     17 ```
     18 public class helloworld {
     19     public static void main(String args[]) {
     20         System.out.println("hello world!");
     21     }
     22 }
     23 ```
     24 
     25 - the java build system is `javac` -> `java` -> it runs
     26 - you can use the `new` keyword to make an instance of a class