CodeByAkram: String
Showing posts with label String. Show all posts
Showing posts with label String. Show all posts
undefined 201

Write a program to print first non repeated char in a string in Java.

We are using the HashMap to store the character as key and count of times it is repeated as value. package com.string.codebyakram; import java.util.HashMap; public class NonReapingCahr { public static void main(String[] args) { String string = "hello"; System.out.println(findNonReapingCahr(string)); } ...