Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Draw the state of memory diagram for the following code: String str1=University; String str2=Technology; Exchange(str1, str2); public void Exchange(String one, String two) {

1. Draw the state of memory diagram for the following code: String str1="University"; String str2="Technology"; Exchange(str1, str2); public void Exchange(String one, String two) { String temp = one; One = two; Two = temp; (3 Marks: 1 Mark for state of each variable) 2. What is the use of array of objects in Java? Illustrate with an example. (3 Marks: 2 mark for the explanation + 1 mark for correct illustration of example) 3. Discuss the difference between Str.concat(Word); and String1.append(Word); Where Str is a String object and String1 is a StringBuffer object. (2 Marks: 1 mark for the explanation of each)

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

Mechanics of Materials

Authors: Russell C. Hibbeler

10th edition

134319656, 978-0134319650

More Books

Students also viewed these Programming questions

Question

Repeat Prob. 535 for maximum shrink-fit conditions.

Answered: 1 week ago

Question

Compare social roles with gender roles. Critical T hinking

Answered: 1 week ago

Question

5. Describe the four parameters of culture.

Answered: 1 week ago