Age = 2013 - BirthYear;
here you have declared Age and integer type variable which can store only integer data. Now, BirthYear is string type, which is why you cannot subtract it from an integer...
Type: Posts; User: satyarlenka
Age = 2013 - BirthYear;
here you have declared Age and integer type variable which can store only integer data. Now, BirthYear is string type, which is why you cannot subtract it from an integer...
Thanks Greg!! :) Oh my god. That's easy. It never really stuck my mind. Especially the second one.(facepalm)
It has been a few weeks for me in Java. Yesterday I was trying to write a program to check if a given number is palindrome or not. I was able to write a program in which it asks the user to input the...
That was very helpful. Thanks :)
Doesn't matter what IDE you are using, all you need is knowledge and then a text editor is enough to write excellent programs. My tip for you is: whichever IDE you are using, stick to that one, until...
Welcome here. And all the best with your java programming.
I am Satya R Lenka, currently a graduation student under the department of Electronics, Institute Of Technical Education And Research, India. I have started to learn Java few days ago. I am an...