Advertisement
Guest User

Untitled

a guest
Feb 6th, 2025
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. public class Main {
  2.    public static void main(String[] args) {
  3.       print(any());
  4.    }
  5.  
  6.    static <T> T any() {
  7.       return null;
  8.    }
  9.  
  10.    static void print(Object obj) {
  11.       System.out.println("Object!");
  12.    }
  13.  
  14.    static void print(String str) {
  15.       System.out.println("String!");
  16.    }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement