Saturday, 15 October 2011

String and its methods video free download

Click here to download String and its methods video

In java String is an object that can be assigned with a group of characters enclosed in double quotes. String class cannot be subclassed as it is declared final in the java.lang package.

The class header of String class is

Public final class String extends Object implements java.lang.Serializable

Strings are immutable in nature. When a string is created, a memory allocation is assigned. When reassigned, the string is allocated a new memory location and old one is garbage collected. That is, for every assignment, a  new location is created.

Some important methods:
indexOf(char ch)
charAt(int index)
Substring(int num)

No comments:

Post a Comment