This site requires JavaScript, please enable it in your browser!
Greenfoot back
johnsec
johnsec wrote ...

2021/11/4

How to add strings

johnsec johnsec

2021/11/4

#
private String num1 = Greenfoot.ask("What is number 1?"); private String num2 = Greenfoot.ask("What is number 2?");\ I am trying to add these two strings together. How am I able to do that
danpost danpost

2021/11/4

#
johnsec wrote...
I am trying to add these two strings together. How am I able to do that
String combinedNums = num1 + num2;
You need to login to post a reply.