Core java
12 MayJava String charAt example
String’s charAt method returns char value present at specified index. String is nothing but Sequence of char values and it starts with index 0. Method Signature: [crayon-6a27deff72b4a434671282/] String charAt Example: [crayon-6a27deff72b52715826037/] When you run above program, you will get below output: [crayon-6a27deff72b53946807857/]
11 MayJava String trim example
String’s trim method is used to remove leading and trailing space. Sometimes, you get extra leading or trailing space and your program does not work as expected. It returns String object after removing leading and trailing spaces. String’s trim method does not remove middle spaces. String trim example: [crayon-6a27deff732c5774650520/] When you run above program, you […]
10 MayHow to check if two Strings are Anagrams in Java
In this post, we will see how to check if two Strings are Anagrams in java. Anagrams mean if two Strings have the same characters but in a different order. For example: Angel and Angle are anagrams There are many ways to check if Strings are anagrams in java. Some of them are: Using String […]
10 MayJava String regionMatches example
String’s regionMatches is used to compare substring of one string to substring of another.Here region may be refer to substring of String, so we are comparing regions of one string with another. Method Syntax:Â There are two overloaded version of regionMatches: [crayon-6a27deff74157095677684/] Parameters: ignoreCase: It is boolean field to indicate whether to ignore case or […]
10 MayJava String isEmpty example
String’s isEmpty method checks if length of string is 0 or not. It returns true if length of String is 0 else return false. Method Signature: [crayon-6a27deff74606736245751/] String isEmpty Example: [crayon-6a27deff7460b435708762/] When you run above program, you will get below output: [crayon-6a27deff7460c643583332/]
09 MayJava String length example
String’s length method is used to calculate length of String. It returns number of character in the String. Method Signature: [crayon-6a27deff74b32109772157/] String length Example: [crayon-6a27deff74b36644680119/] When you run above program, you will get below output: [crayon-6a27deff74b38123589826/]
08 MayJava 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 […]
08 MayJava String join example
String’s join method can be used to join various String by the delimiter. It is introduced in java 8. For example: We need to join various Strings by “,”. You can use join method as [crayon-6a27deff778eb962309589/] There are two overloaded variants of String’s join method: [crayon-6a27deff778f4548696498/] String join example: [crayon-6a27deff778f6531474190/] When you run above program, […]
08 MayGuÃa práctica de apuestas Sportium: matemáticas y trucos de operador
Esta no es una reseña genérica de casino — este es un manual práctico de operador para los jugadores de Sportium apuestas. Aquà encontrarás todo lo necesario para gestionar tu cuenta, calcular bonos, resolver problemas y exprimir al máximo tu experiencia. Getting Ready Verifica que tienes conexión a internet estable y un dispositivo compatible (PC, […]