0
How do i make an int have words
im trying to make int app say "Firefox" using int browser but it just pops up with zero.i know how to do numbers public class Computer { public Computer() { } public void openApp(int app) { System.out.println ("You opened " + app + " on your desktop!"); } public static int browser ;{ System.out.println ("FireFox"); } public static void main(String[] args) { Computer desktop = new Computer(); int application = browser; desktop.openApp(application); } }
2 odpowiedzi
+ 3
you could use strings
string array and use the int as the index
create a hash map, each number correlates to a specific browser.
arrayList...
lots of options
0
integer is a whole number im stupid