12:22 am - Monday June 26, 2017

Author Archives: veera

Delete the String or a word in a String Buffer at the Specified Position

BACK In this Tutorial you will learn how to Delete String Using StringBuffer Delete Method With Example program. public class StringBufferDeleteExample { public static void main(String[] args) { StringBuffer sb = new StringBuffer("Students"); sb.delete(3,...

Reverse the String or Word in a String Buffer at the Specified Position

BACK In this Tutorial you will learn how to Reverse String Using StringBuffer Reverse Method With Example program. public class StringBufferReverseExample { public static void main(String[] args) { StringBuffer sb = new StringBuffer("Student"); sb.reverse(); System.out.println(sb); } } Output tneduts Explanation: public StringBuffer reverse() Causes...

Replace the String or Word in a String Buffer at the Specified Position

BACK                                 In this Tutorial you will learn how to Replace the characters Using StringBuffer Repalce Method With Example program. public class StringBufferRepalceExample { public...

Insert the string or word in a StringBuffer at the specified position

BACK                                        In this Tutorial you will learn how to insert String Using StringBuffer Insert Method With Example program. public class StringBufferInsertExample { public...

Append two String using StringBuffer append() Method

BACK                                      In this tutorial you will learn how to append two String Using StringBuffer append Method with Example program. public class StringBufferAppendExample { public...

StringBuffer example programs and Tutorial in java

BACK   1)Append two String using StringBuffer append() Method. 2)Insert the String or word in a StringBuffer at the Specified Position. 3)Replace the String or Word in a String Buffer at the Specified Position. 4)Reverse  the String or...

To Call the Hashtable method put using Properties.setProperty(String key, String value) method

BACK This tutorial explains how to Load a property list from the input character stream using Properties.load(Reader reader) method.Properties setProperty(String key, String value) calls the Hashtable method put. import java.util.Properties; public...

To Return an enumeration of all the keys in this property list using Properties.propertyNames() method

BACK                                                    This tutorial explains how to Return an enumeration of all the keys in this property list using Properties.propertyNames() method.Properties...

To Load a property list from the input character stream using Properties.load(Reader reader) method

BACK This tutorial explains how to Load a property list from the input character stream using Properties.load(Reader reader) method.Properties load(Reader reader) reads a property list (key and element pairs) from the input character stream...

To Load a property list from the input byte stream using Properties.load(InputStream inStream)

BACK                                                              This tutorial explains how to Load a property list from the input byte stream using Properties.load(InputStream...

To list out to the specified output stream using list(PrintStream out) method

BACK                                        This tutorial explains how to list out to the specified output using list(PrintWriter out) method.Properties list(PrintWriter out) prints this property list out...

To list out to the specified output stream using list(PrintStream out) method.

BACK This tutorial explains how to list out to the specified output stream using list(PrintStream out) method.Properties list(PrintStream out) prints this property list out to the specified output stream.   import java.util.Properties; public...

To get default values for any keys not found in the property list Properties(Properties defaults) constructor

BACK This tutorial explains how to get default values for any keys not found in the property list Properties(Properties defaults) constructor.Properties defaults a property list that contains default values for any keys not found in this property...

To get specified key in the property list using GetProperty(String key,String defaultValue)

BACK This tutorial explains how to get specified key in the property list using GetProperty(String key,String defaultValue) method.Properties getProperty(String key, String defaultValue) searches for the property with the specified key in this...

To get specified key in the property list using GetProperty(String key)

BACK This tutorial explains how to get specified key in the property list using GetProperty(String key) method,Properties getProperty(String key) searches for the property with the specified key in this property list. import java.lang.Object; public...

To create an empty property list with no default values Properties() constructor

BACK This tutorial explains how to create an empty property list with no default values Properties() constructor,Properties Properties() creates an empty property list with no default values. import java.util.Properties; public class...

To change the name of a file using renameTo()

BACK This tutorial explains how To change the name of a file using renameTo() method,To create a file in java, ‘File.createNewFile()’ method is used,it returns a boolean value, true if the file is created successfully false otherwise. import...

To check permission in file using FilePermission

BACK   This tutorial explains how To check permission in file using FilePermission,this method is used to check that our application can have access to read the file or not. Here is an example of checking a file is read only in Java. import...

To check the file can read and write using canRead() & canWrite()

BACK   This tutorial explains how To check the file can read and write using canRead() & canWrite() method,This method tests whether the file can be modified or not. import java.io.File; public class FileCanwrite { public...

To find last modified files using lastModified()

BACK   This tutorial explains how To find last modified files using lastModified(),Use the SimpleDateFormat(“MM/dd/yyyy”) constructor to make a newSimpleDateFormat class instance.   import java.io.File; import java.text.SimpleDateFormat; import...