Category: string

program for Reverse String in java

program for Reverse String in java

/* Program to perform reverse string operation using CharAt method*/ class reverse_string { public static void main(String args[]) { String reverse_string1= "HOTJAVA"; StringBuffer reverse_string2= new StringBuffer(); int i, j, len = reverse_string1.length(); System.out.println("Original String...

remove

remove specific character from string in java

Learn Java Programming for Beginners import java.io.*; import java.util.*; import java.lang.*; class remove_character { public static void main(String args[])throws IOException { String s,character; char ch1,ch2; DataInputStream in=new DataInputStream(System.in); System.out.print("Enter String: "); s=in.readLine( ); System.out.println("");...

convert string to int java

convert string to int java

Learn Java Programming for Beginners There are Two methods to convert String to integer,first is Using Integer.parseInt() and other is without using Integer.parseInt() method. Method 1: In this method i am using Integer.parseInt(),this method...