String Examples

Chaining Of Methods:

Output: 0 Rule: If both the operands are of numeric type then + operator will perform addition and if at least one operand is of string type then + operator will perform concatenation. Program

Output Hello123 1Hello23 3Hello3 6Hello 3Hello3 1Hello5 Rule: When the string objects are compared by using […]

Continue reading


Method of String Class

1) int length(); This method will return the count of the number of characters available in a string. Sample Program

Output: 12 2) char charAt(int index): This method will return a character that is available at the specified index position. The index position starts from 0. If the specified index is not within the […]

Continue reading


Calculating Student Result Percentage Example Program

Calculating student result percentage example program

Result: Student report card Subject 1marks :91 Subject 2marks :95 Subject 3marks :100 Subject 4marks :89 Subject 5marks :79 Subject 6marks :99 total marks : 553 Average : 92 Welcome Again

Continue reading