+91-85006-22255
Write a program to check if the word can be formed with letters of the other word.
class CanWordBeFormedWithLetters { public static void main(String s[]) { String originalWord = "potato"; System.out.println("The word 'too' is present : " + canFormWord(originalWord, "too")); } public static boolean canFormWord(String originalWord, String formedWord) {
} }
Topic: Java Searching Strings - Java indexOf, lastIndexOf Methods
Read this topic Take test on this topic
Open In App