1. Initialize your string with null.
2. After getting first input and coming inside the loop, first change your integer to string and then get the other value and continue concatnating till the end....
Type: Posts; User: Mr.777
1. Initialize your string with null.
2. After getting first input and coming inside the loop, first change your integer to string and then get the other value and continue concatnating till the end....
I can understand that how much problems are there for newbie. But you need to get rid of these troubles by browsing, learning, making mistakes and then you will be able to learn.
If you are separating each integer into a string with any special character then you may simply use nextInt() of Scanner (util.java).
1. Code tags please.
2. Indentation please.
3. So, now you have all integers as a string concatenated to each other. You can simply extract individual integer and compare it with the other string,...