No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
[CODE]public class duplicate { public static void main(String[] args)throws IOException { System.out.println("Enter words separated by spaces ('.' to quit):"); Set<String> s = new HashSet<String>(); Scanner input = new Scanner(System.in); while (true) { String token = input.next(); if (".".equals(token)) break; if (!s.add(token)) System.out.println("Duplicate detected: " + token); } System.out.println(s.size() + " … | |
i need a code to merge two ordered list of objects of integers.the method should receive references to each of the list objects to be merged , and should return a reference to merged list object. pls help.... | |
I have written this code to determine duplicate words in the string. but its not working. plz help.... i am getting error in line 19.[code]import java.util.*; import java.util.Scanner; public class duplicate { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); System.out.println ("Input length … | |
Re: anyone has an implementation to search a value from key in a hash map? |
The End.