Write the output of the following String and Math Methods in java. public class mathestr { public static void main(String[] args) { double num=2.9993; String msg="Welcome to UTASA"; int num1=(int)Math.floor(num): int num2=(int)Math.ceil(num); System.out.print(msg.substring(numl,13)); System.out.print(msg.charAt(num2)): } } %3D } O a. come to UTAC O b. elcome to UT O c. Icome to UTC d. elcome to UTC

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter10: Object-oriented Programming
Section: Chapter Questions
Problem 13RQ
icon
Related questions
Question
O d. Final sub class
Write the output of the following String and Math Methods in java.
public class mathestr
{
public static void main(String[] args)
{
double num=2.999;
String msg="Welcome to UTASA";
int num1=(int)Math.floor(num);
int num2=(int)Math.ceil(num):
System.out.print(msg.substring(numl,13)):
System.out.print(msg.charAt(num2)):
}
}
O a. come to UTAC
O b. elcome to UT
O c. Icome to UTC
Od. elcome to UTC
Chp
Transcribed Image Text:O d. Final sub class Write the output of the following String and Math Methods in java. public class mathestr { public static void main(String[] args) { double num=2.999; String msg="Welcome to UTASA"; int num1=(int)Math.floor(num); int num2=(int)Math.ceil(num): System.out.print(msg.substring(numl,13)): System.out.print(msg.charAt(num2)): } } O a. come to UTAC O b. elcome to UT O c. Icome to UTC Od. elcome to UTC Chp
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Time complexity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage