public class Store { // new method: constructor! public Store() { System.out.println("I am inside the constructor method."); } // main method is where we create instances! public static void main(String[] args) { System.out.println("Start of the main method."); // create the instance below Store lemonadeStand = new Store(); // print the instance below System.out.println(lemonadeStand); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter