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 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 100 String Programming and Coding Interview Questions
Strings in java – string in java is a important data type . In this article we will discuss java
Continue readingGenerate Combination in java
public class Combination { void doCombination(char []str,int start,int end){ char []data=new char[3]; int i=0; int r=3;//
Continue reading