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); } }

18th Mar 2017, 3:05 AM
David Busev
David Busev - avatar
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
18th Mar 2017, 3:26 AM
Michael Szczepanski
Michael Szczepanski - avatar
0
integer is a whole number im stupid
18th Mar 2017, 8:31 AM
David Busev
David Busev - avatar