Write a Java program to convert an array to an ArrayList, and an ArrayList to an array.
Write a java program to print the Pascal’s Triangle using a 2-d array.
1. Write a Java program without using a second array to reverse elements of each row of a 2-d array of integer values.
e.g. 1 2 3 4 4 3 2 1
5 6 7 8 8 7 6 5
9 10 11 12 12 11 10 9
Write a Java program to find the maximum and minimum value of a 1-d array.
Write a java program to find the sum of the series up to the nth term where n is input by the user.
1+(1+n)+(1+n+n)+(1+n+n+n)……………….nth Term
Example: input n = 6
Output: 1+7+13+19+25+31 = 96
Write a Java program that will print the following series until it reaches 100.
1 1 2 3 5 8 13 …………………………
Write a java program that inputs an integer and outputs if the number is a Palindrome.
Write a program (without using an array) that accepts three numbers from the user and prints "increasing" if the numbers are in increasing order, "decreasing" if the numbers are in decreasing order, and "Neither increasing or decreasing order" otherwise.
Example: Input first number: 1524
Input second number: 2345
Input third number: 3321
Expected Output :
Increasing order
Write a Java program that reads a positive integer and counts the number of digits the number has.
e.g. Input is 14367, Output is 5.
1. Write a program in Java to display a right-angled triangle pattern with numbers, as shown below.
Expected Output :
1
12
123
1234
12345
123456
1234567
12345678
123456789
12345678910