Posts

StringBuilder

Image
  StringBuilder A mutable sequence of characters. This class provides an API compatible with StringBuffer, but with no guarantee of synchronization. This class is designed for use as a drop-in replacement for StringBuffer in places where the string buffer was being used by a single thread (as is generally the case). Where possible, it is recommended that this class be used in preference to StringBuffer as it will be faster under most implementations. The principal operations on a StringBuilder are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string builder. The append method always adds these characters at the end of the builder; the insert method adds the characters at a specified point. For example, if z refers to a string builder object whose current contents are "start", then the method call z.append("l...

StringBuffer

Image
public final class StringBuffer extends Object implements java.io.Serializable, CharSequence A thread-safe, mutable sequence of characters. A string buffer is like a  String , but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls. String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved. The principal operations on a  StringBuffer  are the  append  and  insert  methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The  append  method always ...

String

Image
The  String  class represents character strings. All string literals in Java programs, such as  "abc" , are implemented as instances of this class. Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example: String str = "abc"; is equivalent to: char data[] = {'a', 'b', 'c'}; String str = new String(data); Here are some more examples of how strings can be used: System.out.println("abc"); String cde = "cde"; System.out.println("abc" + cde); String c = "abc".substring(2,3); String d = cde.substring(1, 2); The class  String  includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to upper...

File

Image
                              java.io Class File java.lang.Object java.io.File All Implemented Interfaces: Serializable , java.lang.Comparable< File > public class File extends java.lang.Object implements Serializable , java.lang.Comparable< File > An abstract representation of file and directory pathnames. User interfaces and operating systems use system-dependent  pathname strings  to name files and directories. This class presents an abstract, system-independent view of hierarchical pathnames. An  abstract pathname  has two components: An optional system-dependent  prefix  string, such as a disk-drive specifier,  "/"  for the UNIX root directory, or  "\\\\"  for a Microsoft Windows UNC pathname, and A sequence of zero or more string  names . The first name in an abstract pathname may be a directory name or, in the case of Microsoft Windows UNC...

Features of Java

Image
Features of Java 1. Simple 2. Portable and Platform Independent 3. Compiled and Interpreted 4. Robust and Secure. 5. High Performance 6.Distributed 7. Dynamic 8. Multi threaded

Java Tools

Java Tools Java Environment includes a large no of development tools and hundreds of class And methods. These development tools are said building block of The system known as java development kit(jdk). The java development kit includes a collection of tools That are used for developing and running java programs .

Introducation Of Java

Image
Java JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code. Semptember of 1994 Naughtons and Janathan Payne started Writing Web Runner – a Java Based Web browser , Which Was Later Renamed As Hot Java. Finally java and hot java announced in 1995 Jdk1.0- released in 23rd January 1996 Java is a class-based, object-oriented programming language . It is a general-purpose programming language intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardles...