Question
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
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 StartedRecommended Textbook for
Mechanics of Materials
Authors: Russell C. Hibbeler
10th edition
134319656, 978-0134319650
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App