1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Verdich [7]
3 years ago
8

In this exercise, first run the code as it is given to see the intended output. Then trace through each of the 3 variables to se

e what is actually going on in memory. Show the values of str1, str2, and str3 and the output after each line of code on a piece of paper.
Computers and Technology
1 answer:
dlinn [17]3 years ago
3 0

Answer:

The memory with variable names str1, str2, and str3 all have equal and the same value after the first if-statement.

Explanation:

The str1 was first assigned a null value while the str2 and str3 were assigned the string value "Karen" with the String class and directly respectively. On the first if-statement, the condition checks if the str1 is null and assigns the value of the variable str2 to str1, then the other conditional statement compares the values of all the string variables.

You might be interested in
Write the definition of a class Clock. The class has no constructors and three instance variables. One is of type int called hou
maksim [4K]

Answer:

Following are the program definition in the Java Programming Language.

//define a class

public class Clock

{

//set integer type variable and initialize value

private int hours=12;

//set boolean type variable and initialize value

private boolean isTicking=true;

//set integer type variable and initialize value

private Integer diff=5;

}

Explanation:

Following are the description of Code.

  • Firstly define a class "Clock" with the "private" access modifier.
  • Then,  set the integer data type variable "hours" with the "private" access modifier and assign value 12 in that class.
  • After that, set the boolean data type variable "isTicking" with the "private" access modifier and assign value "true".
  • Finally set Integer class variable "diff" with the the private access modifier and assign value 5.
3 0
3 years ago
Implement a function inValues() that asks the user to input a set of nonzero floating-point values. When the user enters a value
elena-s [515]

Answer:

Explanation:

The following is written in Python and uses exception handling to do exactly as requested. It then goes adding all of the integer values to an array called num_list and finally adding them all together when the function ends.

def in_values():

   num_list = []

   while True:

       try:

           num = input("Input non-zero floating point: ")

           num = int(num)

           if num == 0:

               break

           else:

               num_list.append(num)

       except ValueError:

           print("No valid integer! Please try again ...")

           try:

               num = input("Input non-zero floating point: ")

               num = int(num)

               break

           except ValueError:

               break

   sum = 0

   for number in num_list:

       sum += number

   return sum

5 0
3 years ago
Write the name of the tab, the command group, and the icon that you need to use to justify
Dafna11 [192]

Answer:

Tab: Home Tab

Command Group: Paragraph

Icon: Justify Icon

<em>The icon has no name; rather it is represented by 4 horizontal lines that are aligned on both edges</em>

<em />

Explanation:

To answer this question, I'll make use of the following attachment

<em>Where</em>

<em>1- represents the home tab</em>

<em>2 - represents the paragraph</em>

<em>3 - represents the justify icon</em>

<em />

3 0
3 years ago
15. Feelings (maps, coins, clues, etc.) and the invisClue books were some innovative ways used to keep __________ players engage
Anit [1.1K]

Answer:

pong i could be wrong i think its right tho

Explanation:

5 0
3 years ago
Read 2 more answers
Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This
lutik1710 [3]
I’m confused what are you asking
7 0
3 years ago
Other questions:
  • A subclass of Value, LargerValue, is defined with a getValue method that returns twice the value of the parent. Which line is th
    13·1 answer
  • Which of the following is considered a benefit when using slab allocator?
    6·1 answer
  • Software is nothing but a piece of code or set of instructions written in a chip to run a hardware device on the Computer. O Tru
    14·1 answer
  • In C++ write a program that prints out PI as a type double and a type float EXACTLY as shown below. Your program should have ONE
    13·1 answer
  • IMPORTANT!!<br><br> How can you get real answer keys for edmentum (plato) courses as a student?
    11·1 answer
  • How did punch cards improve the weaving process?
    11·1 answer
  • Which online article citation is correctly formatted according to MLA standards?
    15·2 answers
  • Victoria has a .... of playing with her hair when she gets nervous​
    9·1 answer
  • Okay so I've have 10 Brainliest, through my whole time using brainly- I want people to get brainly and points so Im giving away
    6·2 answers
  • Tina has taken the time to modify font sizes and colors in a text box and would like to duplicate those settings on other text b
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!