|
You are to write a program to check unique number in
Java
import
public class IsUnique
Set<Character> set = new
if (set.contains(c))
public static boolean
if (chars.length <= 1)
char temp = chars[0];
if (chars[i] == temp)
return true;
public static void main(String[] args)
}
Output: Unique Not Unique |
|
Relevant Reading Java BooksJava Certification, Programming, JavaBean and Object Oriented Reference Books Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|