class mb { private String startMethod ="kick"; public void start() { System.out.println(startMethod+"starting......."); } public void start(String method) { this.startMethod=method; System.out.println(startMethod+"starting......."); } } public class lab17 { public static void main(String[]args) { mb b=new mb(); b.start(); b.start("self"); } }
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