1 6 package depending; 7 8 11 public class Main { 12 public static void main(String [] args) { 13 String standaloneVersion = standalone.Main.getVersion(); 14 if (standaloneVersion!=null) { 15 System.out.println("you are using version " + standaloneVersion + " of class " + standalone.Main.class.getName()); 16 } else { 17 System.err.println("failed to get version of " + standalone.Main.class.getName()); 18 } 19 String message = "i am " + Main.class.getName() + " and " + standalone.Main.class.getName() + " will do the job for me"; 20 System.out.println("standard message : " + message); 21 System.out.println("capitalized message : " + standalone.Main.capitalizeWords(message)); 22 } 23 } 24 | Popular Tags |