December 2019 - CodeByAkram
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)); } ...
Page 1 of 61236Next