6 WEEKS TRAINING

We provide 6 weeks industrial training in Java and Android to B.Tech, B.E. engineering graduates.

6 MONTHS TRAINING

We provide 6 Months live project based industrial training in Java and Android to B.Tech, B.E., MCA, BCA students.

CORPORATE TRAINING

We provide customized and cost effective corporate training in Java, Spring, Hibernate, Web Services, Android, and Angular JS.

Assignment 4: Use of arrays in Java

  • 10 questions Complexity: Medium

java ArraySum ↵

Enter No 1: 5 ↵
Enter No 2: 8 ↵
.........................
Enter No 10: 3 ↵

Sum of the numbers is ....

java MaxMin ↵

Enter No 1: 20 ↵
Enter No 2: -5 ↵
.........................
Enter No 10: 8 ↵

Max number is .... and Min numbers is ....

Let the array be initialized by {2,5,6,1,9,7,3,2,8,9}.

java Swapper ↵

Initial Array elements: 2, 5 ,6, 1, 9, 7, 3, 2, 8, 9
Array elements after swapping: 2, 5, 1, 6, 7, 3, 2, 8, 9, 9

Let the array be initialized by {2,5,6,2,9,7,3,2,8,9}

java DuplicateFinder ↵

Initial Array elements: 2, 5 ,6, 2, 9, 7, 3, 2, 8, 9

Duplicate Element  Frequency Of Occurance
 2 3
 9 2

Define another class named MergerTest which contains main() method. In the main() method, two integer arrays of 4 & 5 elements are created and initialized. Their elements are printed, a new array is obtained by merging them with the help of merge() method of the Merger class and elements of the merged array are printed.

Let the arrays be initialized as {2,5,6,2} and {7,3,2,8,6}.

java MergeTest ↵

First Array elements: 2, 5, 6, 2
Second Array elements: 7, 3, 2, 8, 6
Merged Array elements: 2, 5, 6, 2, 7, 3, 2, 8, 6

Define another class named DRTest which contains main() method. In the main() method, a character array of 10 elements is created and initialized. Its elements are printed, duplicate elements are get removed with the help of removeDuplicate() method of the DuplicateRemover class and again its elements are printed.

Let the arrays be initialized as {‘A’, ‘T’, ‘F’, ‘U’, ‘T’ , ‘V’, ‘A’, ‘N’, ‘S’, ‘G’}.

java DRTest ↵

Array elements: A , T, F, U, T, V, A, N, S, G
Array elements after duplicates are removed: A, T, F, U, V, N, S, G

Define another class named FindIndex which contains main() method. In the main() method, a character array of 10 elements is created and initialized. Its elements are printed, a character is received as input from the keyboard. The index of the character in the array is obtained with the help of indexOf() method of the IndexFinder class, and is displayed as output.

Let the arrays be initialized as {‘A’, ‘T’, ‘F’, ‘u’, ‘t’ , ‘V’, ‘a’, ‘N’, ‘I’, ‘g’}.

java FindeIndex ↵

Array elements: A , T, F, u, t, V, a, N, I, g
Enter char to be searched: V ↵
V is found at index 5 in the array.

Define another class named SubArray which contains main() method. In the main() method, an int array of 10 elements is created and initialized. Its elements are printed. StartIndex and endIndex are read from the keyboard and a sub array is obtained with the help of subArray() method of the Array class.Contents of the sub array are displayed.

Let the source array be initialized by {2,5,6,2,7,3,2,-7,8,6}.

java SubArray ↵

Array elements: 2 , 5, 6, 2, 7, 3, 2, -7, 8, 6
Enter StartIndex: 2 ↵
Enter EndIndex: 5 ↵
Sub Array elements: 6, 2, 7, 3

Define another class VFTest which contains main() method. In the main() method, a character array of 10 elements is created and initialized. Its elements are printed, a new array is obtained with the help of filterVowel() method of the VowelFilter class, and elements of the obtained array are printed.

Let the array be initialized by {‘A’, ‘T’, ‘F’, ‘u’, ‘t’ , ‘V’, ‘a’, ‘N’, ‘I’, ‘g’}.

java VFTest ↵

Array elements: A , T, F, u, t, V, a, N, I, g
Array elements after vowel filtering: T, F, t, V, N, g

Define another class named SortingTest which contains main() method. In the main() method, an array of 10 integers is created and initialized. Its elements are printed, sorted with the help of sort() method of the Sorter and the sorted elementes are printed.

Let the array be initialized as {2,5,6,1,9,7,3,2,8,9}.

java SortingTest ↵

Array elements before sorting: 2,5,6,1,9,7,3,2,8,9
Array elements after sorting: 1, 2, 2, 3, 5, 6, 7, 8, 9, 9

For queries:  8130-311-892,  9212-468-649

ONE YEAR VALIDITY

Admission is valid for one year i.e students can revise the course any number of times if popular fee plan is opted.

INDUSTRIAL TRAINING CERTIFICATION

Industrial training and course certificates are provided after the successful completion of each course.

PLACEMENT ASSISTANCE

We provide 100% placement assistance to all the students on the basis of monthly assessment tests.