Skip to main content

Posts

Showing posts from May 31, 2022

JAVA STRING

  Java String In Java, string is basically an object that represents sequence of char values. An array of characters works same as Java string. For example: char [] ch={'j','a','v','a','t','p','o','i','n','t'};   String s=new String(ch);   is same as: the String s="javatpoint";    Java String class provides a lot of methods to perform operations on strings such as compare(), concat(), equals(), split(), length(), replace(), compareTo(), intern(), substring() etc. The java.lang.String class implements Serializable, Comparable and CharSequence interfaces.  CharSequence Interface The CharSequence interface is used to represent the sequence of characters. String, StringBuffer and StringBuilder classes implement it. It means, we can create strings in Java by using these three classes. The Java String is immutable which means it cannot be changed. Whenever we change any string, a new instance is created...

JAVA TUTORIAL

Java Tutorial Our core Java programming tutorial is designed for students and working professionals. Java is an object-oriented, class-based, concurrent, secured and general-purpose computer-programming language. It is a widely used robust technology. What is Java? Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language. Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since Oak was already a registered company, so James Gosling and his team changed the name from Oak to Java. Platform : Any hardware or software environment in which a program runs, is known as a platform. Since Java has a runtime environment (JRE) and API, it is called a platform. Java Example Let's have a quick look at Java programming example. A detailed description of Hello Java example is available in next page. Simple.ja...