(c
)
Write the output for the following:
String sl = "Life is Beautiful";
System.out.println("Earth" + sl.substring(4));
System.out.println( sl.ends With("L"));
Answers
Answered by
2
I dont undeatand what is the question
Answered by
2
Refer the attached image for the output.
Explanation:
Program:
public class Main
{
public static void main(String[] args) {
//Declaring the string
String sl = "Life is Beautiful";
System.out.println("Earth" + sl.substring(4));
System.out.println(sl.endsWith("L"));
}
}
- The above program is written in java language.
- Java is a class-based and object oriented programming language.
- Java is used for many purposes.
- Java is used to develop many applications.
- Java is a programming language that is used on your computer by developers to build applications.
- It lowers costs, shortens timeframes for growth, promotes creativity, and strengthens application services.
Refer the attached image for the output.
Attachments:
Similar questions