Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

begnetitiont (1.6) Frt 17=1are (1.4) How many times does the inner loop execute in the following [5 marks] code block: for (int p=0;p0;c=c4 ) 1

image text in transcribed
image text in transcribed
begnetitiont (1.6) Frt 17=1are (1.4) How many times does the inner loop execute in the following [5 marks] code block: for (int p=0;p0;c=c4 ) 1 System.out.println ("In inner loop"); , (1.5) What is the value in the variable result after the following code [5 marks] segment runs: String s1= new String ("hel1o"); String s2 = new String ("Hello"); int result = (s1. equals(s2)) ? 10:100; (1.6) What is the value in the variable newst after the following code [5 marks] segment runs: String 51 = new String("this is a sentence for the exam"); String newst = new string ("); newst = s1.substring (23)+ s1. substring (9,18)

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions

Question

LO 12-2 Discuss the major legislation affecting labor unions.

Answered: 1 week ago

Question

1. Does your voice project confidence? Authority?

Answered: 1 week ago