• 1Installation
  • 2Write First Sweet Apex
  • 3Transpile It
  • 4Transpiled Apex Class
  • 5Deploy and Check

Sweet.apex

  • Docs
  • Tutorials
Getting started with Sweet.apex

6 min

Write First Sweet Apex

Go to any directory(/Users/wilson/sweet_apex/src, for example), and write a simple Sweet Apex file.

public class HelloSweetApex {
    public static void main() {
        Integer a = 5;
        Integer b = 7;
        System.debug(a % b);
    }
}
 
1
public class HelloSweetApex {
2
    public static void main() {
3
        Integer a = 5;
4
        Integer b = 7;
5
        System.debug(a % b);
6
    }
7
}

Well, this is simple. But be careful. This file won't compile in Apex, because % is not supported. However, we are writing Sweet Apex files, and we will see what will happen.

Done
Copy