search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
82 views
asked Sr Member 4.8k points 10 25 31

1 Answer

0 votes
public class MainClass {
  static void print(String s, int i) {
    System.out.println("String: " + s + ", int: " + i);
  }

  static void print(int i, String s) {
    System.out.println("int: " + i + ", String: " + s);
  }

  public static void main(String[] args) {
    print("String first", 11);
    print(99, "Int first");
  }
}
output
String: String first, int: 11
int: 99, String: Int first
answered Sr Member 4.8k points 10 25 31

Related questions

0 votes
1 answer 88 views
0 votes
1 answer 40 views
40 views
asked smith Geek 15.3k points 16 41 63
0 votes
1 answer 89 views
89 views
asked augustaina Sr Member 4.8k points 10 25 31
0 votes
1 answer 57 views
0 votes
1 answer 12 views
...