String methods indexOf() and lastIndexOf() - Java

Difference between the String methods indexOf( ) and lastIndexOf( )

1. The method indexOf() returns the first occurrence (index) of a given character or a combination as parameter in a given string.

2. The method lastIndexOf() returns the last occurrence (last index) of a given character or combination in a given string.
Difference between protected and default access - Java
The default access specifier is one which is not specified with a key word. If no access specifier (any one of private, protected, public) is mentioned it is known as the default access specifier...
Ways that the members of a package can be used by other packages - Java
There are two ways of affecting access levels. One, when the classes in the Java platform are used within the developer defined classes, the access levels determine the members of those class which can be used by the developer defined classes...
Explain Java’s delegation event model - Java
The event model is based on the Event Source and Event Listeners. Event Listener is an object that receives the messages / events. The Event Source is any object which creates the message / event...
Post your comment