public class Damascus{
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
AssaultRifles fal = new AssaultRifles("FAL",99,621,45,160,75,25,45,180,5,110,23);
switch (secondChoice) {
case 'n':
changeS = input.nextLine();
fal.setName(changeS);
System.out.println("Name changed to: "+fal.getName);
break;
//i want the change to be there when i run the program again
Asked
Active
Viewed 10 times
0

PM 77-1
- 12,933
- 21
- 68
- 111
-
sorry if the question is weird, im still trying to get the hang of stack overflow. – Angel Alvarez Apr 15 '20 at 22:46
-
2If you want any data persist through restart of your program, you need to save it into a file. – PM 77-1 Apr 15 '20 at 22:49
-
Check the link I gave at the top to see if it answers your question. – Code-Apprentice Apr 15 '20 at 22:49