Question: public static void main (String [] args) {String str1, str2; int Y; char X; str1 = Success is the result of hard work; x =

 public static void main (String [] args) {String str1, str2; int

public static void main (String [] args) {String str1, str2; int Y; char X; str1 = "Success is the result of hard work"; x = str1, charAt (5); System, out. Print1n ("the value of x is; " + x); y = stri.indexOf ('h'); y = str1.indexOf ('w', y); str2 = str1. Substring (y); System. Out. Printin (x); System. Out. Printin (y); System. Out. Printin (str2);} public static void main (String [] args) {String str1, str2; int Y; char X; str1 = "Success is the result of hard work"; x = str1, charAt (5); System, out. Print1n ("the value of x is; " + x); y = stri.indexOf ('h'); y = str1.indexOf ('w', y); str2 = str1. Substring (y); System. Out. Printin (x); System. Out. Printin (y); System. Out. Printin (str2);}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!