Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP. JAVA PROGRAM. THANKS Given the following variables, find methods that answer the following questions. Make sure each answer is a line of code
PLEASE HELP. JAVA PROGRAM. THANKS
Given the following variables, find methods that answer the following questions. Make sure each answer is a line of code that would actually run. Example: Find a method in the String class that checks the length ofsi1. Answer: int length s1.length0; //this answer is a line of code that would actually run Note: You may name the variable that holds your return value (in the example I named it length) anything you like. String s1-"seashells String s2-"basketbalr int n 3; int n1-4; char letter-'f; char cl 'd; 1) Find a method in the String class that checks if the last letter of s1 is s. 2) Find a method in the String class that checks if the first letter of s2 is b. 3) Find a method in the String class that converts s2 into an array of chars. 4) Find a method in the Character class that converts variable letter into an uppercase letter. 5) Find a method in the Character class that tells us if c1 is uppercase or not. 6) Find a method in the Math class that tells us which is larger: n or n1. 7) Find a method in the Math class that tells us which is smaller: n or n1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started