Write a program that performs the following actions: Read 2n integers as input. Create two arraylists to store n elements in each arraylist. Write a function generateOddEvenList which accepts this two arraylist as input. The function fetch…
java program to find String Occurrences in the sentence, Obtain two strings from user as input. Your program should count the number of occurrences of second word of second sentence in the first sentence. Return the count…
Write a Program which finds the longest word from a sentence. Your program should read a sentence as input from user and return the longest word. In case there are two words of maximum length…
Java program to replace char in the string, Obtain two strings from the user as input. Your program should modify the first string such that all the characters are replaced by plus sign (+) except…
Write a program to check if a given string is palindrome and contains at least two different vowels. Note Case Insensitive while considering vowel, i.e a & A are the same vowels, But Case sensitive…
Write a program to calculate the sum of all the non prime positive numbers less than or equal to the given number. Note: prime is a natural number greater than 1 that has no positive…
Write a java program to calculates the sum of squares in given digit. Write a program that accepts a positive number as input and calculates the sum of squares of individual digits of the given…
Write a program that accepts an ArrayList of integers as input and removes every 3rd element and prints the final ArrayList. Suppose the given arrayList contains 10 elements remove the 3rd, 6th and 9th elements.…
Write a java program to find if the array has any triplets. Given an integer array, Write a program to find if the array has any triplets. A triplet is a value if it appears…
Write a java program to remove duplicate elements in the string array. Write a program to read a string array, remove duplicate elements and sort the array. Note: The check for duplicate elements must be…