1. Introduction to String In Java, a String is an object that represents a sequence of characters . Strings are written using double quotation marks (" ") . Example: String s = "Java" ; A character array can also be used to create a String. Example: char [] ch = { 'j' , 'a' , 'v' , 'a' }; String s = new String ( ch ); This is the same as: String s = "java" ; Java StringBuffer Class The StringBuffer class is used to create mutable (modifiable) string objects . Unlike the String class, StringBuffer objects can be modified after creation . · String → Immutable (cannot change) · StringBuffer → Mutable (can change) Features of StringBuffer · Characters can be inserted, replaced, or deleted · Automatically grows when more characters are adde...
1. Write a program to find simple interest of any principal amount taking all input from user. 2. Write a program to find the sun of n natural numbers and also find the average of those. 3. Writre program to display whether the year entered by user is leap year or not. 4. Write a program to find find whether the number entered by user is palindrome or not. 5. Write a program to find the smallest among 3 numbers. 6. Write a program to print the factorial of numbers. 7. Write a program to print multiplication table of any numbers. 8. Write a program to print the fibonacci series upto n numbers. 9. Develop a Student Result Processing System that takes a student’s name and marks of five subjects, then calculates the total and percentage. If any subject mark is below 40, the student is Fail . Otherwise, assign division based on percentage: 80%+ Distinction, 60–79 First, 50–59 Second, 40–49 Third. Finally, display total, percentage, division, and Pass/Fail status. 10....