In our application sometime there is need of byte array. We can use byte array for encryption purpose . We
Continue readingCategory: string
How to find all occurrences of string in a string Java
Find all occurrences of string in a string. for this we will use one loop and indexof() method public class
Continue readingConvert StringBuilder To String
In this example firstly create a string builder and then convert it to string using toString() method. package com.javapro.string; public
Continue readingConvert String To Integer
Convert string to a number in java public class ConvertStringToInteger { public static void main(String[] args) { String number=”123″; int
Continue readingExpand String
Write A Function String expnadString(String x); string x=”1,2,3,6″; output : 1,2,3,4,5,6 x=1,….,4….,10 output: 1,2,3,4,5,6,7,8,9,10 public class ExpandMyString { public static
Continue readingHow to Print Double Quotes in JAVA
how to print double quotes in java public class Display { public static void main(String[] args) { String str=”GANGA:”+””RIVER””; System.out.print(str);
Continue readingCheck a string value is Integer or not in java
Check a given string value is Integer or not in java private boolean isInteger(String str){ for (int i =
Continue readingCheck ia string is hexadecimal number or not
Check if a String is Hexadecimal number or not in java public boolean isHexNumber(String){ boolean flag; try { int
Continue readingRead File And Count Occurrence Of Word In Java
Read a file and count the occurrence of word in java import java.io.File; import java.io.FileReader; import java.io.BufferedReader; import java.io.InputStreamReader; import
Continue readingTop String Programs In Java
Top String Program In Java Check a string value is Integer or not in java. (Solution). Check string is hexadecimal
Continue reading