Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Test {
- // This works.
- // main is overloaded
- // Don't do it!! Just confuse people!!
- public static double main(double x, double y)
- {
- return (x+y)/2;
- }
- // execution starts here
- public static void main(String[] d) {
- double v = main(3,4);
- System.out.println(v); // 3.5
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment