Skip to content

Instantly share code, notes, and snippets.

@lukaseder
Created August 25, 2020 09:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaseder/5a135f6bf91cbbc4eea73e1a76a18a91 to your computer and use it in GitHub Desktop.
Save lukaseder/5a135f6bf91cbbc4eea73e1a76a18a91 to your computer and use it in GitHub Desktop.
public class TwoMains {
public static void main(String[] args) {
System.out.println("main");
mаin(args);
}
public static void mаin(String[] args) {
System.out.println("other mаin");
}
}
@jeffrade
Copy link

🔍

public class TwoMains {
    public static void main(String[] args) {
        System.out.println("main");
        printBinary("main");
        mаin(args);
    }

    public static void mаin(String[] args) {
        System.out.println("other mаin");
        printBinary("mаin");
    }

    public static void printBinary(String s) {
        char[] chars = s.toCharArray();
        for (char c : chars) {
            System.out.print(Integer.toBinaryString(c) + "|");
        }
        System.out.println("");
    }
}

@googya
Copy link

googya commented Sep 14, 2020

the name of the second method is not "main" actually。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment