DUET PG Score Card 2021
NHAI Recruitment 2021
Bihar Board 12th Dummy Admit Card 2022
RBI Assistant Notification 2021
Jee Advanced 2021 Result
NIACL Assistant Recruitment 2021
SBI PO Online Form 2021

Write a class MultiplesInArray with a public method findMultiples that takes three parameters arr of type int[] and other two are m1 and m2 are of type int

Write a class MultiplesInArray with a public method findMultiples that takes three parameters arr of type int[] and other two are m1 and m2 are of type int. Print all the elements in the array, but if any element in the array is a multiple of m1, print multiple of (actual value of m1 should be printed instead of ). …

Read more

Write a class SequenceCount with a public method sequenceCount that takes one parameter arr of type int[] and returns the count of sequences present in the arr. The return type of sequenceCount should be int

Write a class SequenceCount with a public method sequenceCount that takes one parameter arr of type int[] and returns the count of sequences present in the arr. The return type of sequenceCount should be int. Assumptions: arr is never null arr may contain zero or more sequences A sequence is defined as a combination of …

Read more

Create a class IsWorkingDay with a main method. The method receives one command line argument which is the name of the weekday

Create a class IsWorkingDay with a main method. The method receives one command line argument which is the name of the weekday. If the argument is equal to Sunday or Saturday the program should print Holiday, otherwise it should print Working Day. For Example: Cmd Args : Monday Working …

Read more

Write a class IsWorkingDay with a main method. The method receives one command line argument which is the name of the weekday

Write a class IsWorkingDay with a main method. The method receives one command line argument which is the name of the weekday. Write the missing code in the If-else statement such that if the argument passed to the main method is equal to Sunday the program should print Holiday, otherwise …

Read more

Write a class ElementCount with a main method which passes an arr of type int[] and an element of type int. Print number of

write a class ElementCount with a main method which passes an arr of type int[] and an element of type int. Print number of times the element is present in the arr. Here is an example: int[] arr = {1, 12, 9, 3, 5, 3, 78, 4, 3, 9, 18, 56, 1, 5} …

Read more

Write a class ElementCheck with a public method checkFirstOrLast that takes two parameters one is arr of type int[] and second one is arg of type int and returns true

Write a class ElementCheck with a public method checkFirstOrLast that takes two parameters one is arr of type int[] and second one is arg of type int and returns true if the arg is first or last element in the arr else returns false. The return type of checkFirstOrLast is boolean. Assumption: arr is never null Here is an example: Enter …

Read more

Write a class ReversePrint with a public method reversePrint that takes one parameter arr of type int[] and returns the elements of arr in reverse order

Write a class ReversePrint with a public method reversePrint that takes one parameter arr of type int[] and returns the elements of arr in reverse order. The return type of ReversePrint should be int. Assumptions: arr is never null Here is an example: Cmd Args : 32 56 85 1 Array in reverse order is …

Read more

Create a class PrintDiff with a public method computeDiff that takes two parameters firstNo and secondNo are of type int.

Java; Create a class PrintDiff with a public method computeDiff that takes two parameters firstNo and secondNo are of type int. Calculate the difference between firstNo and secondNo. If the value of the difference is in between -25 and 25, the program should double the value and print the output, otherwise it should print the difference as it …

Read more