Skip to content

Tag Archives: Java-String-Programs

Given a List of String, the task is to convert the List to a comma separated String in Java. Examples: Input: List<String> = ["Geeks", "ForGeeks",… Read More
Given an ArrayList of String, the task is to convert the ArrayList to String array in java. Examples: Input: ArrayList = [ "Geeks", "for", "Geeks"… Read More
Given a String, the task is to replace a character at a specific index in this string in Java. Examples: Input: String = "Geeks Gor… Read More
Given a String, the task is to convert it into comma separated List. Examples: Input: String = "Geeks For Geeks" Output: List = [Geeks, For,… Read More
Given a Set of String, the task is to convert the Set to a comma separated String in Java. Examples: Input: Set<String> = ["Geeks", "ForGeeks",… Read More
Given a String with extra delimiter at the end, the task is to remove this extra delimiter in Java. Examples: Input: String = "Geeks, For,… Read More
Given a String in date format, the task is to convert this String into actual Date. Examples: Input: string = "2018-10-28T15:23:01Z" Output: 2018-10-28T15:23:01Z Input: string… Read More
Given a String, the task is to convert it into Double in Java. Examples: Input: String = "20.156" Output: 20.156 Input: String = "456.21" Output:… Read More
Given a Set of Strings, the task is to convert the Set into an Array of Strings in Java. Examples: Input: Set<String>: ["ForGeeks", "A Computer… Read More
Given a String, the task is to convert it into a List of Characters in Java. Examples: Input: String = "Geeks" Output: [G, e, e,… Read More
Given a String str, the task is to get a specific character from that String at a specific index. Examples: Input: str = "Geeks", index… Read More
Given a Instream containing ASCII values, the task is to convert this Instream into a String containing the characters corresponding to the ASCII values. Examples:… Read More
Given a String, the task is to convert this String into an IntStream containing the ASCII values of the characters as the elements. Examples: Input:… Read More
Given a String and a Word, the task is remove that Word from the String. Examples: Input: String = "Geeks For Geeks", Word = "For"… Read More
Given a String and an array of prefixes. The task is to check whether the given String starts with any of the given prefixes or… Read More