Java2Blog
  • Home
  • Core Java
  • Tutorials
    • Spring
    • Spring Boot
    • Spring MVC
    • Java 8
    • Hibernate
  • Categories
    • Interview Questions
    • Spring Frameworks
    • Core java
    • Python
    • C++
  • NM
close
import_contacts

Java Tutorials

  • Core Java
  • Java Interview questions
  • Java 8 Stream
  • Java interview programs
import_contacts

Data structure and algorithm

  • Data structure in java
  • Data structure interview questions
import_contacts

Spring tutorials

  • Spring tutorial
  • Spring boot tutorial
  • Spring MVC tutorial
  • Spring interview questions

Character

  • Character java programs
    20 January

    Program to find frequency of characters in a string in java

    In this tutorial, we will see simple program to find frequency of characters in a string in java. There are multiple ways to solve this proble. Let’s see one by one. Using counter array Here is the algorithm for the same. Initialize counter array of 256 length Iterate over String and increase count by 1 […]

    Read More
  • Basic java programs Character
    19 January

    Java Program to Check Whether a Character is Alphabet or Not

    This tutorial provides Java Program to Check Whether a Character is Alphabet or Not. [crayon-681e20997895f093735392/] Output: Enter a Character : d d is an alphabet. The ASCII value of lowercase alphabets range from 97 to 122. And, the ASCII value of uppercase alphabets range from 65 to 90. That’s why, we compared variable character between […]

    Read More
  • Basic java programs Character
    19 January

    Java Program to check a Character is Vowel or Consonant

    In this post, we will see how to check a Character is Vowel or Consonant. You just need to check if character is part of set {a,A,e,E,i,I,o,O,u,U}.If it is part of set then it is Vowel else Consonant. [crayon-681e209978f49567034738/] Output: Enter an Alphabet : g g is a Consonant That’s all about Java Program to […]

    Read More
  • Algorithm Interview Character java programs String
    08 May

    Java Program to find duplicate Characters in a String

    In this post, we will see how to find duplicate Characters in a String. Approach: Create a HashMap and character of String will be inserted as key and its count as value. If Hashamap already contains char,increase its count by 1, else put char in HashMap If value of Char is more than 1, that means it […]

    Read More
  • Character Conversion String
    04 May

    How to convert Char Array to String in java

    There are multiple ways to convert Char Array to String in java. Some of them are: Using String class’s constructor (By passing Char array to contructor) Using String class’s valueOf method Using iterating char array Example: [crayon-681e209979206640248748/] When you run above program, you will get below output [crayon-681e209979209024394318/] Other String Programs are : How to […]

    Read More
  • Character Conversion String
    04 May

    How to convert String to Char Array in java

    Java String’s toCharArray() method can be used to convert String to char Array in java. It is simplest method to convert String to char Array. Example: [crayon-681e2099796fd960196572/] When you run above program, you will get below output: [crayon-681e209979702262699116/] Other String Programs are : String : How to reverse String in java How to check if […]

    Read More
  • keyboard_arrow_left Previous
  • 1
  • 2

Newsletter


Let’s be Friends

  • Facebook
  • Twitter
  • LinkedIn

© 2020-22 Java2Blog Privacy Policy