Write Java code to find the power of each individual element according to its position index, add them up and return as output. The return type of the output is an integer which is the…
Write code to remove vowels from the even position in the string. The return type of the output is string after removing all the vowels. Input and Output Format: Input is a string.…
Write java code to validate the password using the following rules: Must contain at least one digit Must contain at least one of the following special characters @, #, $ The length should be between…
Write a program to encrypt the given string using the following rules and return the encrypted string: Replace the characters at odd positions by the next character in the alphabet. Leave the characters at even…
Obtain a date string in the format dd/mm/yyyy. Write code to validate the given date against the given format. The return type of the validateDate method is 1 if the given date format matches the specified…
Write a program to read a positive number as input and to get the reverse of the given number and return it as output. The return type is an integer value which is the reverse of…
Write a code to read two int array lists of size 5 each as input and to merge the two arrayLists, sort the merged array list in ascending order and fetch the elements at 2nd, 6th…
Write a program to read a string and a positive integer n as input and construct a string with first n and last n characters in the given string. The return type of the output should…
Write a program to read a string and to test whether the first and last character is same. The string is said to be valid if the 1st and last character are the same. Else the…
Write a program to read a string of even length and to fetch two middlemost characters from the input string and return it as string output. Include a class UserMainCode with a static method getMiddleChars which accepts a string of…