State what’s printed for each println in the code below:

public static void main(String args[ ])

{

MyClass theObj = new MyClass( );
theObj.gravy = 107.43;
String s = "hello";
int xray[] = {1, 2, 3, 4, 5};
double floozy = 97.4;
myMethod(floozy, theObj, xray, s );
System.out.println(floozy); // Problem 1:
System.out.println(theObj.gravy); //Problem 2:
System.out.println(xray[2]); //Problem 3:
System.out.println(s); //Problem 4:
}
public static void myMethod(double floozy, MyClass anObj, int a[ ], String s)
{
floozy = 13.1;
anObj.gravy = 10.001;
a[2] = 100; s = "good bye";
}

Answers

Answer 1

Answer:

Explanation:

Each of the following println statements will print the following values

ystem.out.println(floozy); // Problem 1:   97.4

System.out.println(theObj.gravy); //Problem 2:  107.43

System.out.println(xray[2]); //Problem 3:  100

System.out.println(s); //Problem 4: Hello

This is because out of all of the variables that the myMethod gives a value to, the only variable that is being saved back to the global variable in the main method is a[2]. The other variables are being saved as instance variables and not being returned. Therefore, when the println statements are called they target the local variables in the main method.


Related Questions

A drink costs 2 dollars. A taco costs 3 dollars. Given the number of each, compute total cost and assign totalCost with the result. Ex: 4 drinks and 6 tacos yields totalCost of 26.
*/
int main() {
int numDrinks = 0;
int numTacos = 0;
int totalCost = 0;
numDrinks = 4;
numTacos = 6;
/* Your solution goes here */
totalCost = (2 * numDrinks) + (3 * numTacos);
cout << "Total cost: " << totalCost << endl;
return 0;
}

Answers

Answer:

See Explanation

Explanation:

The question has been answered; however, the program is not dynamic enough because the output will always be 26.

To make it dynamic, replace the following lines of code:

numDrinks = 4;

numTacos = 6;

with:

cout<<"Number of drinks: ";

cin>>numDrinks;

cout<<"Number of Tacos: ";

cin>>numTacos;

The above lines of code will let the user input different values for numDrinks and numTacos each time the program is executed.

Computing the total cost using code can be represented as follows:

def total_cost(no_of_drinks, no_of_talcos):

  totalCost = 2*no_of_drinks + 3*no_of_talcos

  return totalCost

print(total_cost(4, 6))

Python code explanation:

A function named total_cost is declared and it accept the parameters no_of_drinks and no_of_talcos.

The totalCost is used to store the result of the cost of the total drinks and tacos bought in dollars.

Then, we return the totalCost.

Finally, we use the print statement to call the function with its required parameters.

learn more on python code:https://brainly.com/question/14479908?referrer=searchResults

Identify the correct characteristics of Python lists. Check all that apply. Python lists are enclosed in curly braces { }. Python lists contain items separated by commas. Python lists are versatile Python data types. Python lists may use single quotes, double quotes, or no quotes.

Answers

Answer:

Python lists contain items separated by commas.

Python lists are versatile Python data types.

Python lists may uses single quotes, double quotes, or no quotes.

Explanation:

Python Lists are enclosed in regular brackets [ ], not curly brackets { }, so this is not a correct characteristic.

Answer:

a c d

Explanation:

Design a flowchart for an algorithm which adds prim numbers starting from 1 up to 50. Change

the flow chart to a pseudocode.​

Answers

Answer:

Explanation:. ALGORITHM AND FLOW CHART. 1.1 Introduction. 1.2 Problem Solving ... money. After knowing the balance in his account, he/she decides to with draw the ... change it to a sports channel, you need to do something i.e. move to that channel by ... Problem4: Design an algorithm with a natural number, n, as its input which.

Consider the following method, inCommon, which takes two Integer ArrayList parameters. The method returns true if the same integer value appears in both lists at least one time, and false otherwise.
public static boolean inCommon(ArrayList a, ArrayList b)
{
for (int i = 0; i < a.size(); i++)
{
for (int j = 0; j < b.size(); j++) // Line 5
{
if (a.get(i).equals(b.get(j)))
{
return true;
}
}
}
return false;
}
Which of the following best explains the impact to the inCommon method when line 5 is replaced by for (int j = b.size() - 1; j > 0; j--) ?
A. The change has no impact on the behavior of the method.
B. After the change, the method will never check the first element in list b.
C. After the change, the method will never check the last element in list b.
D. After the change, the method will never check the first and the last elements in list b.
E. The change will cause the method to throw an IndexOutOfBounds exception.

Answers

Answer:

The answer is "Option b".

Explanation:

In the given code, a static method "inCommon" is declared, that accepts two array lists in its parameter, and inside the method two for loop is used, in which a conditional statement used, that checks element of array list a is equal to the element of array list b. If the condition is true it will return the value true, and if the condition is not true, it will return a false value. In this, the second loop is not used because j>0 so will never check the element of the first element.

Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase.

Ex: If the input is:
n Monday

the output is:
1

Ex: If the input is:
z Today is Monday

the output is:
0

Ex: If the input is:
n It's a sunny day

the output is:
2

Case matters.

Ex: If the input is:
n Nobody

the output is:
0

n is different than N.

Learning Python

Answers

Explanation:

1

Ex: If the input is:

z Today is Monday

the output is:

0

Ex: If the input is:

n It's a sunny day

the output is:

2

Case matters.

Ex: If the input is:

n Nobody

the output is:

0

n is different than N.

Learning Python

I've included my code in the picture below. Best of luck.

Write a class called TextProcessor that implements the methods listed below. Your implementation may use the charAt() and length() methods from the String class You must not use any other String methods, and you must not use any of the methods in the Character class. You may not use any integer literal values except for 0 and 1.

Answers

Ieisiwizudhrhejwjjsjrjrjje

How many clients has
Accenture engaged globally on blockchain?

Answers

3,84, 000 people are engaged globally on blockchain.

- blockchain network technology by Accenture creates a database and allows the different organizations to access it in real-time without privacy issues

- For this Blockchain project, Accenture has employed 3,84,000 people approximately all over the world.

- The motto of Accenture’s Blockchain project is “Enable and empower multiparty systems to accelerate transformation”

A network interface card was installed on Shawn's computer. The function of a network interface card is to _____.


enable his computer to be connected to a network

keep his documents secure

store files that can be shared

speed up his computer

Answers

Answer:

The correct answer is Option 1: enable his computer to be connected to a network

Explanation:

Network interface card, as it is clear from the name, is added to the computer system to enable the computer to connect to the internet. If a computer doesn't have network interface card, it cannot connect to the internet.

Hence,

The correct answer is Option 1: enable his computer to be connected to a network

Answer:

enable his computer to be connected to a network

what is the significance of the following terms A A L U control unit in the CPU​

Answers

Answer:

Explanation:

The function of ALU is to perform arithmetic operations(add,subtract, multiply,division) as well as logical operations(compare values).

The function of CU is to control and coordinate the activities of the computer.

Which of the following groups might sign a non-disclosure agreement between them?

the local government and its citizens

a group of employees or contractors

a company and an employee or contractor

two competing businesses or companiesc​

Answers

Answer: I believe the right answer is between a company and employee or contractor.

Explanation: I think this is the answer because a non-disclosure is a legal contract between a person and a company stating that all sensitive. information will be kept confidential.

Answer:a

Explanation:

In this program we are going to practice using the Math class by computing some important values on the unit circle. Starting at 0 and going up by
PI/4 radians (or 45 degrees), print out information of the format below.
Radians: (cos, sin)
0.0: 1.0, 0.0
0.79: 0.7, 0.71
1.57: 0.0, 1.0
2.36: -0.71, 0.7
3.14: -1.0, 0.0
3.93: -0.7, -0.71
4.71: 0.0, -1.0
5.5: 0.71, -0.71
Hints:
You’ll need to use the Math.sin, Math.cos methods
and the Math.PI constant!
You’ll also need to loop from 0 to 2*PI
You can round a decimal to 2 decimal places by multiplying by 100, rounding to the nearest int, and then dividing by 100. Here’s an example:
double value = 0.431675;
value = value * 100; // 43.1675
value = Math.round(value) // 43.0
value = value / 100.0; // 0.43
// Or put it all on one line:
value = Math.round(value * 100) / 100.0;

Answers

Answer:

The program in Java is:

import java.lang.*;

public class MyClass {

   public static void main(String args[]) {

     for(int i= 0;i<360;i+=45){          

         double angle = Math.round(Math.toRadians(i)*100.0)/100.0;

         double cosX = Math.round(Math.cos(angle)*100.0)/100.0;

         double sinX = Math.round(Math.sin(angle)*100.0)/100.0;

         

         System.out.println(angle+": "+cosX +" "+ sinX);

     }

   }

}

Explanation:

This line iterates through the angles from 0 to 360 or 0 to 2*Pi

for(int i= 0;i<360;i+=45){          

This calculates the angle to radians

         double angle = Math.round(Math.toRadians(i)*100.0)/100.0;

This calculats the cosine of the angle rounded to 2 decimal place

         double cosX = Math.round(Math.cos(angle)*100.0)/100.0;

This calculats the sine of the angle rounded to 2 decimal place

         double sinX = Math.round(Math.sin(angle)*100.0)/100.0;

This prints the required output          

         System.out.println(angle+": "+cosX +" "+ sinX);

     }

Why is it important to know how to create a professional email?

Answers

So people think you are professional based on what you write.

Answer:

It is important to write a professional email because you need to make a good impression. This also shows that you are determined.

I need help, who is a great phone pin lock screen cracker?

Answers

Answer:

738159

now it's depend on you.

6. Pattern Displays

Use for loops to construct a program that displays a triangle of Xs on the screen. The

triangle should look like this

X XXXXX

XX XXXX

XXX XXX

XXXX XX

XXXXX X​


please give me answer of this question

Answers

Answer:

public static void displayPattern()

  {

 

      for (int x = 1; x <= 5; x++)

      {

       for (int i = 0; i <= 6; i++)

       {

           if (x == i)

           {

             System.out.print(" ");

           } else {

             System.out.print("X");

           }

       }

       System.out.println("");

      }

     

  }

Develop a C program to read the name and score of a student .The program should calculate the status given the following . If score is equal to or greater than 50 then status is "PASS" otherwise "FAIL".

Answers

Ok this is a little compilated but do this

#define boolean _Bool
#define false 0
#define true 1

Make an array list of students and names

int main()
{
boolean pass = false;
boolean fail = false;

Now make some more code to compare the grades and names
for(int I = 0; standard procedure)
{insert code here}
}

Sorry if I am not that helpful it is 1:00 in the morning right now.

After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linking to the hardware setting up a network configuring the software

Answers

Answer:

configuring the software

Explanation:

Alexandre is said to have installed a new software to her computer and then proceeds to set it up to perform in a certain way. What she did was to configure the software.

Configuring software in a computer has to do with setting it up to behave in certain ways according to the user.

Social media marketing began in the mid
1970s
1980s
1990s
2000s

Answers

Answer:

1990's i think

Explanation:

File
Home
Insert
Formulas
Data
Review
View
Automate
Help
Editing
Calibri Light
16
B
Bra Av
2
CS
General
G
A
B
С
D
E
F
L
H
1
3
3 In cell D7, create a formula that calculates the tax for the invoice. Us
a
sales tax rate of 7.5%
SABROSA
Catering Invoice
Sabrosa Empanadas & More
1202 Biscayne Bay Drive
Orlando, FL 32804
Invoice #:
6710A Date:
10/15/20
In cell Ds, create a formula that finds the total for the order. In other
this formula should add cells D3:07.
Empanadas & More
1
In cell D9 create a formula that calculates the total after a 10% disco
you need help understanding how to take a percentage off of a total
LINE TOTAL
2 MENU ITEM
3 Empanadas: Buffalo Chicken
4 Empanadas: Braised Short Rib
5 Empanadas: Fig and Goat Cheese
6 Sides: Black beans and rice
7
UNIT PRICE
$2.98
$2.98
$3.75
$1.98
QUANTITY
20
30
25
40
TAX
8
TOTAL
TOTAL AFTER DISCOUNT:
9
+
Catering Invoice Catering Subtotal challenge
C Mode tomate Workbook to
Helo improve Office
100%
-

Answers

Explanation:

formula should add cells D3:07.

Empanadas & More

1

In cell D9 create a formula that calculates the total after a 10% disco

you need help understanding how to take a percentage off of a total

LINE TOTAL

2 MENU ITEM

3 Empanadas: Buffalo Chicken

4 Empanadas: Braised Short Rib

5 Empanadas: Fig and Goat Cheese

6 Sides: Black beans and rice

7

UNIT PRICE

$2.98

$2.98

$3.75

$1.98

QUANTITY

20

30

25

40

TAX

8

TOTAL

Select the correct answer. Why is it important to identify your audience while making a presentation? A. It helps you define the time limit and number of slides required in the presentation. B. It helps you adapt the presentation to the appropriate level and complexity. C. It helps you establish whether you require a conclusion in your presentation. D. It helps you decide how much practice you need for the presentation.

Answers

Answer:B

Explanation:

Just saw brown vent open on the front door in the right direction lol I have o clue where

Cathy connected a keyboard, mouse, and printer to her Computer through a Bluetooth connection. What type of network has she created?

Answers

Answer:

Cathy has created a Personal Area Network

Explanation:

Let us define a personal area network.

A personal area network is created by connecting multiple devices of a user and it is panned over a very short distance. Mainly used technology is Bluetooth.

Cathy has used Bluetooth to connect keyboard, mouse and printer to her computer, she has formed a Personal Area Network.

Answer: pan

Explanation: got it right edmentum

Differentiate between Calling and Called program?

Answers

Answer:

The program name in CALL statement called as CALLED program/Sub program. A program can contain as many CALLs required and no restriction on it. In other words, CALLING program can CALL as many subprograms required. CALLED may not have the CALL statement to call another program.

Explanation:

An administrator edits the network firewall configuration. After editing the configuration, the administrator logs the date and time of the edit and why it was performed in the firewall documentation. Which of the following BEST describes these actions?

a. Asset management
b. Baselines
c. Network maps
d. Change management

Answers

Answer:

d. Change management

Explanation:

Change management can be defined as a strategic process which typically involves implementing changes (modifications) to an existing process or elements on a computer system.

In this scenario, an administrator edits the network firewall configuration. After editing the configuration, the administrator logs the date and time of the edit and why it was performed in the firewall documentation. Thus, what best describes these actions is change management.

As a network administrator, you would be required to perform changes to your network and network devices in order to get an optimum level of performance.

Given two input integers for an arrowhead and arrow body, print a right-facing arrow.

Ex: If the input is:

Answers

Answer:

I don't know the language this is but here is something that will work for all lang

int num0 = 0;

int num1 = 0;

basically just print the ints in the right dimension

Explanation:

Sorry if I am wrong

I don't know much about this someone else's answer might be better than mine

Do you think it’s better for a young designer to use free, open-source art programs or to pay for commercial programs? Explain your answer, but come up with at least one counterargument that forces you to defend your position when you explain why you think one option is better than the other.

Answers

Answer:

I think that if you are starting you should use a free, open-source art program. Because starting up with alot of things like this is hard with no money but the resources that we have could help with that. That's why I think the free one is better than paying, especially monthly pay.

Explanation:

Quick please, URGENT

1.Explain why the scenario below fails to meet the definition of due diligence in coding.

Situation: As you are developing an app for a small fee, you include access to many other services, such as searching the Internet.


3.A programmer must know platforms and other languages. On what "side" is Groovy?

programmer side

Web-based side

server-side

client-side

4.Give two reasons why there are more contract workers than permanent workers

5.Explain why the scenario below fails to meet the definition of an app with persona.

Situation: Jim built an app for a company in which the user navigates a Web site by clicking on links and reading written material.

6.Explain why the scenario below is not a description of an angel investor.

Situation: Ray has an idea for developing an app and finds individuals who will invest in the app. These individuals sign an agreement that they expect no money or rights in the app.

7.In an app design project, who is responsible for the SDKs?

the programmer

the developer

the senior executive

the senior staff

8.Suppose you are offered a position that focuses on writing policies, hiring staff, and focusing on the company's mission. What position are you offered?

legal executive

technology executive

resources executive

programming executive

Answers

Answer: it is the code it is wrong

Explanation:

CSc 2720 - Data Structures: Assignment 1 [100 points] How to Submit: Turn the .java file in Folder Assignment 1 in iCollege no later than 11:00 p.m. ET on 01/27/2021 Notes: 1. Do not use any library for matrix multiplication. 2. Always use comments to explain your program. 3. No copying allowed. If it is found that students copy from each other, all of these programs will get 0. 4. You must use matrix.java as the program name; otherwise, you will lose 10%. Requirements: You are to write a program name matrix.java that makes the dot products of 2 arrays. 1. Your program should prompt the user for the dimensions of the two squares matrices, making sure that the user input is equal to 50. 2. If the above is not met, prompt the user for a new value. 3. Now generate random integer numbers (ranging from 0 to 50) to fill both matrices. 4. Display these two matrices on the screen. 5. Multiply the two matrices and display the result on the screen. 6. Insert a clock to see how long it would take to multiply these two matrices and display the time (with a message to this effect). 7. Prompt the user asking if they want to repeat the program. A simple example of program output (here matrix dimension is 4, your should be 50):

Answers

Hehehwkwjhdhebfhshshwjbrbr

Dan notices that his camera does not capture pictures correctly. It appears that less light is entering the camera. Which component of the camera could be responsible for the problem?

Answers

hi i think The lens but I am not sure

var nums = [1,1, 2, 3, 5, 8, 13, 21];
var copyNums = [1,1, 2, 3, 5, 8, 13, 21];
for(var i=0; i < copyNums.length; i++){
if(copyNums[i] == 1){
insertItem(copyNums,i,"hello");
}
}
This code will create an infinite loop. Why does it create an infinite loop?

Answers

Answer:

Explanation:

This code creates an infinite loop because it is detecting that the first value of copyNums is 1, therefore it runs the insertItem code. This code then adds the value "hello" to the array in position i which would be 0. Then moves to the next value of the array, but since the element "hello" pushed the value 1 to the next index then the code just repeats itself with the same value of 1. This continues to happen because every time the value "hello" is added it simply pushes the 1 to the next index and repeats the same code.

Answer:

[tex]var nums = [1,1, 2, 3, 5, 8, 13, 21];

var copyNums = [1,1, 2, 3, 5, 8, 13, 21];

for(var i=0; i < copyNums.length; i++){

if(copyNums[i] == 1){

insertItem(copyNums,i,"hello");

}

}[/tex]

Write a program that reads an integer between o and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all the digits is 14. Hint: Use the % operator to extract digits, and use the / operator to remove the extracted digit. For instance, 932 % 10=2 and 932/10 =93. Here is a sample run:
Enter a number between 0 and 1000 : 999
The sum of digits is 27.

Answers

Answer:

Answered below

Explanation:

#Program is written in Python programming language

digit = 0

sum = 0

num = int(input("Enter a number between 0 and 1000: ")

#Check that number is within the valid range

if num > 0 and num <= 1000:

while num != 0:

#Isolate each digit

digit = num % 10

sum = sum + digit

#Remove isolated digit from number

num = num/10

else:

print("Number is not within valid range")

#print total sum of digits

print(sum)

6.2 lesson practice

Answers

Answer:

I am guessing it would be 20

Explanation:

In the draw canvas text code the last number from the color is probably the font size.

Correct me if I'm wrong

Other Questions
If the calcium in your blood decreases below homeostasis levels, a gland in thebrain will sense the decrease and send a chemical message to your bones. Yourbones will release calcium into the blood, bringing blood calcium levels back up. *PLEASE HELP UrgentIs it positive or negative feedback _____political activities includecomplaining to one's supervisor,bypassing the chain of command,forming coalitions, obstructingorganizational politics, excessivelyadhering to rules, developingcontacts outside the organization.Select one:a. Illegitimateb. Externalc. Internald. Legitimate= Legitimate CHEMISTRY H E L PIn the following chemical reaction, what reactant is represented by X? AlCl + X Al(OH) + NaClA) NaOHB) ClOHC) Al(OH)D) It cannot be determined. HELP ASAP 15 pointsWhat is the domain of the relation {(-4,1),(-2,0), (8,-1)}?a {-1,1)b. {-1, 0, 1)C. {-4,-2,8)d. (-4,-2,-1, 0, 1, 8} in the figure shown, line AB is parallel to line CD.Part A: What is the measure of angle x? Show your work. (5 points)Part B: Explain how you found the measure of angle x by identifying the angle relationships that you used along the transversal. Helpppp Which of the following is true of an industrial society?Check all that applyA.) The birthrate rises steadily B.) There are fewer infant and child deathsC.) The cost of raising a child drops significantlyD.) Birthrates drop, and may even drop low enough to reverse population growth what is the domain of the function on the graph? Please help me after all of my questions are solved i will do a 100 points giveaway Write the following numbers in scientific notation: a) 0.0006730 b)50000.0 c)0.000003010 d) 132.40 e)2232 ABC is given with line m drawn through A parallel to BC. In the course of proving that the interior angle measures of ABC sum to 180, which of the following will be shown? Select the two correct answers.A. 1BB. mBAC+mC+m2=180C. m1+mBAC+m2=180D. 1CE. 2A megakaryocytes are huge cells found in red bone marrow that extend long tendrils into blood sinusoids. The flow of blood breaks off small portions of those tendrils creating the formed element known as Question 1 of 10What might happen to personal information when it is transferred usingdigital signals?A. Some information might be changed when the data are copied.B. It might be accessed by someone who was not the intendedrecipient.C. The information might change while being transmitted because ofnoise.D. The information might change to analog, making it less reliable. what is 3856 times 4656 equal Here's a graph of a linear function. Write the equation that describes that function. Serenity has some pennies and some nickels. She has no less than 18 coins worth at most $0.66 combined. If Serenity has 12 pennies, determine the maximum number of nickels that she could have. If there are no possible solutions, submit an empty answer. What is the standard deviation of this data set?12, 14, 9, 11, 10, 15, 16, 12, 7, 14 what may happen to the body when exposed to an infection?A. your body responds by functioning normallyB. the body gets a surge of energy causing a slight increase in body temperature and you feel greatC. your body responds by raising the core body temperature causing a fever.D. nothing happens when the human body is exposed to an infection (7, 11)(3, 6)(5,8)Is this relation a function? Describe a good first aider using an acrostic:F - I -R -S -T-A -I -D -E -R - Two sides of a triangle have the same length. The third side measures 6 m less than twice the common length. The perimeter of the triangle is 14 m. What are the lengths of the three sides?What is the length of the two sides that have the same length?