Snippets Collections
Human fred = new Human();

fred.setName('Fred');
fred.setAge(18);

fred.Run();
fred.Jump();
fred.Climb();
public class Human {
    public String Name;
    public Integer Age;
    
    public Human(){
      this.Age = 0;
    }
        
    public void setName(String Name){
        this.Name = Name;
    } 
    
    public void setAge(String Name){
        this.Age = Age;
    } 
    
    public void Run(){
        System.debug('Run');
    } 
    
    public void Jump(){
        System.debug('Jump');
    } 
    
    public void Climb(){
        System.debug('Climb');
    } 
}
enum State {
  Visited,
  Unvisited,
  Visiting    
}
class Node {
    State state;
    public Node() {
        // say something about the state
    }
}
star

Thu Sep 16 2021 17:38:28 GMT+0000 (UTC) https://www.zenintech.org/blog/creating-your-first-apex-class

#apex #salesforce #static #keywords #class
star

Wed Apr 01 2020 07:05:44 GMT+0000 (UTC) https://stackoverflow.com/questions/60963806/how-can-i-implement-a-class-when-one-of-its-properties-is-an-enum-variable

#java #java #enumvariable #class

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension