subject

Run the following code to check how String class Methods work, discuss with tutor, if you need explanation of any method. Make changes and try different variations. String myString ="KOI is my University";
String s1= "KOI";
String s2= "koi";
String s3 = " Hello KOI ";
System. out. println("Char at index 2(third char): " + myString. charAt(2)); System. out. println("After Concat: "+ myString. concat("-Enjoy-")); System. out. println("Checking equals with case: " +s2.equals(s1)); System. out. println("Checking Length: "+ myString. length()); System. out. println("Replace function: "+ myString. replace("fun", "easy")); System. out. println("SubString of myString: "+ myString. substring(8)); System. out. println("SubString of myString: "+ myString. substring(8, 12)); System. out. println("Converting to lower case: "+ myString. toLowerCase()); System. out. println("Converting to upper case: "+ myString. toUpperCase()); System. out. println("Triming string: " + s3.trim()); System. out. println("searching s1 in myString: " + myString. contains(s1)); System. out. println("searching s2 in myString: " + myString. contains(s2));

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a.if the manual switch s is on, then the light l is on. b.besides the manual switch, there is a motion detector, m1, which activatesthis light.c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d.the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
You know the right answer?
Run the following code to check how String class Methods work, discuss with tutor, if you need expla...
Questions
question
Spanish, 23.06.2020 21:01
question
Mathematics, 23.06.2020 21:01
question
Mathematics, 23.06.2020 21:01
Questions on the website: 13722360