Programming for beginners

This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)

Showing posts with label Character. Show all posts
Showing posts with label Character. Show all posts
Saturday, 12 November 2022

Check whether a string has any non-white space character or not

›
Write a function that takes a string as input and return true, if the string contain any non-whitespace character, else false.   A chara...
Wednesday, 29 April 2020

Check whether given character present in string or not

›
Using ‘indexOf’ method, we can check whether given character is present in string or not. ‘indexOf()’ method return -1, if given character...
Tuesday, 21 April 2020

Java: Convert String to a character

›
Following snippet converts the string to a character. public static char getChar(String str) {          if (str == null || str.lengt...
Monday, 2 March 2020

Java: Check given character is letter or not

›
'Character.isLetter' method is used to check whether given character is letter or not. App.java package com.sample.app; publ...

Java: Check whether given character is whitespace or not

›
'Character.isWhitespace' method takes a character and return true if the given character is whitespace, else false. App.java p...
›
Home
View web version
Powered by Blogger.