can insert if statement on and how? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

can insert if statement on and how?

https://code.sololearn.com/cW5wM5ej7WWz/?ref=app

28th Mar 2020, 9:28 PM
said bakari abasi
said bakari abasi - avatar
5 Answers
+ 2
Do you mean something like this? https://code.sololearn.com/c8JziRBTxT9c/?ref=app If you enter e.g. "saidi" it prints the name and the age. Edit: I think Царь СОБАКА - Догго l code seems to be what you are looking for
28th Mar 2020, 10:42 PM
Denise Roßberg
Denise Roßberg - avatar
+ 4
what i want is that if will use the integer of 25 also to get an output "pitt"
28th Mar 2020, 10:21 PM
said bakari abasi
said bakari abasi - avatar
+ 3
example: public class MyClass{ public static void main(String[]args){ Hashmap<string, integer>Age = new Hashmap<string, integer>( ); age.put("saidi", 24) age.put("pitt", 25) System.out.println(get.age("saidi")) } }
28th Mar 2020, 10:01 PM
said bakari abasi
said bakari abasi - avatar
+ 2
Hello saidi bakari Can you give an example? I am not sure what you want to do with an if statement.
28th Mar 2020, 9:54 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
But can you describe what you want to do? Sorry, I still don't know why you need an if statement.
28th Mar 2020, 10:18 PM
Denise Roßberg
Denise Roßberg - avatar