public class Main { public static void main (String[] args) { Cars azatCar = new Cars(); azatCar.brand = "Mazda" ; azatCar.year = 2005 ; azatCar.color = "blue" ; Cars someOtherCar = new Cars () ; someOtherCar.color = "black" ; someOtherCar.year = 2020 ; someOtherCar.brand = "BMW" ; System.out.println(azatCar.brand); } }
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