Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. Given the variable declarations below: byte myByte; int myInt; long myLong; char myChar; float myFloat; double myDouble; Which one of the following assignments would

5. Given the variable declarations below:

byte myByte; int myInt; long myLong; char myChar; float myFloat; double myDouble;

Which one of the following assignments would need an explicit cast (choose all that appy)? a) myInt = myByte; b) myInt = myLong; c) myByte = 3; d) myInt = myChar; e) myFloat = myDouble;

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

3. If s1 is declared as: String s1 = "phenobarbital"; What will be the value of s2 after the following line of code executes?

String s2 = s1.substring( 3, 5 );

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

4. Which method below can change a String object, s ?

a. equals( s )

b. substring( s )

c. concat( s )

d. toUpperCase( s )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago