Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is the code thats bringing up the error

System.out.print( name + " "+ "(Aged" + " " + Age + ")" + "," + "your answer is " + first*Second );
Posted
Comments
Richard MacCutchan 21-May-15 13:52pm    
You need to show the code preceding this that declares the variable types.
[no name] 21-May-15 13:57pm    
See his previous question to this reposted uninformative snippet.
[no name] 21-May-15 13:58pm    
Because first and Second are strings. You can't just multiply strings together.
Adamdew93 21-May-15 15:13pm    
how would I convert them to integers?
virusstorm 21-May-15 15:49pm    
Take a look at this article:
http://alvinalexander.com/java/edu/qanda/pjqa00010.shtml

1 solution

Thanks to Wes for pointing out the original of this repost. I suggest you go to http://download.oracle.com/javase/tutorial/index.html[^] and start learning some of the basics.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900