Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Second.Semester;
- public class nextNumOfArray {
- public static void main(String[] args) {
- int[] array1 = {9,9,8};
- String combined = "";
- for (int i = 0; i < array1.length; i++) {
- combined += Integer.toString(array1[i]);
- }
- int parsedNumber = Integer.parseInt(combined);
- System.out.println(parsedNumber+1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement