Write Java statements that accomplish the following:
a. Declare int variables x and y.
b. Initialize an int variable x to 10 and a char variable ch to 'B'.
c. Update the value of an int variable x by adding 5 to it.
d. Declare and initialize a double variable payRate to 12.50.
e. Copy the value of an int variable firstNum into an int variable tempNum.
f. Swap the contents of the int variables x and y. (Declare additional variables, if necessary.)
g. Suppose x and y are double variables. Output the contents of x, y, and the expression x + 12 / y – 18.
h. Declare a char variable grade and set the value of grade to 'A'

Answers

Answer 1

The java statements that accomplish the following include:

a. /Declare int variables x and y

int x, y

b. /Initialize an int variable x to 10

int x = 10;

//Initialize a char variable ch to 'B'

char ch = 'B';

c. //Update the value of an int variable x by adding 5 to it

x = x + 5;

d. //Declare and initialize a double variable payRate to 12.50

double payRate = 12.50;

e. //Copy the value of an int variable firstNum into an int variable tempNum

int tempNum = firstNum;

f. int temp = x;

x = y;

y = temp

g. //Output the contents of x, y

System.out.println("x = " + x);

System.out.println("y = " + y);

//Output the expression x + 12 / y — 18

System.out.println("expression = " + ((x + 12) / (y - 18)));

h. //Declare a char variable grade and set the value of grade to 'A'.

char grade = 'A';

What are Java statements?

Java statements, like declaration and string statements, are instructions that tell the programming language what to do.

Basic statements define variables and begin the execution of Java methods or blocks of other statements. Variables are assigned values using assignment statements.

Learn more about java statement on:

https://brainly.com/question/25458754

#SPJ1


Related Questions

Correctly punctuate this sentence:You can’t go to the waterpark during the winter of course but they’ll open again in the summer.

Answers

The sentence can be punctuated correctly as follows:

You can’t go to the waterpark during the winter of course, but they’ll open again in the summer.What is the correct punctuation for this sentence?

The best way to punctuate this sentence is to put the comma after the word, course. This is used to separate the first idea expressed from the second one. The comma is often used to separate one idea from another.

We can see that in the first part of the sentence, the author is trying to express the certainty of the fact that one cannot go to the waterpark during winter. In the second part of the sentence, he helps the reader to realize that the water park will open again in summer.

Learn more about punctuations here:

https://brainly.com/question/1224394

#SPJ1

1. I am so thirsty, that my throat is as dry as a bone.
Which technique is being used?
Simile, Metaphor, Personification, or Hyperbole
How did you identify the technique?

Answers

Answer:

Metaphor

Explanation:

Since this sentence is not literally applicable, the answer is Metaphor

Metahpor-a figure of speech in which a word or phrase is applied to an object or action to which it is not literally applicable.

Back to Assignment
Attempts
Score/4
2. Post-Test: Varying Sentence Structure
Choose the best revision for the following sentences.
Joel went to sleep early. He wasn't tired. He wanted to get an early start the next day.
O Although he wasn't tired, Joel went to bed early because he wanted to get an early start the next day.
O Because Joel wanted to get an early start the next day, he went to sleep early. He wasn't tired.
O Even though he wasn't tired, Joel wanted to get an early start the next day. He went to bed early.
O Joel went to sleep early, but he wasn't tired. He wanted to get an early start the next day.

Answers

The best revision for the following sentence in reference with sentence structure : Joel went to sleep early. He wasn't tired. He want-ed to get an early start the ne-xt day.

Revised sentence - Joel went to sleep early, but he wasn't tired. He want-ed to get an early st-art the ne-xt day.

What do you mean by sentence structure ?

Sentence structure is the way a sent-ence is arran-ged , grammati-cally . The sentence struc-ture of your writing inc-ludes where the noun and verb fall with-in an indivi-dual sentence.

Sentence struct-ure is the gramm-atical arrange-ment of words in sent-ences.

To know more about sentence structure click below:

brainly.com/question/13135091

#SPJ1

what is the __________ ways to check someone

Answers

What is the effective ways to check someone?

How are checks processed?

Following the usual method for processing manual checks, the check that one writes to a merchant (commercial or microfinance bank) is put forward by the merchant at the merchant's bank and the actual paper check is then moved from bank to bank. This process could take a few days.

A check refers to a written, dated, and signed tool that mandates a bank to issue a particular amount of money to the holder. The writer that writes the check is known as the payor or drawer, while the person who benefits from the check is the payee. The drawee, on the other hand, is the bank on which the check is drawn.

Therefore, the correct answer is as given above.

learn more about cheque: https://brainly.com/question/24555580

#SPJ1

Read the sentences.

[1] I am interested in history. [2] I decided to read the Declaration of Independence.

Which of the following options shows the best revisions of sentences 1 and 2 to create sentence variety without combining the sentences?

Answers

Answer:

What are the options listed in your question? You've only provided the sentences without listing the possibilities/options.

Explanation:

1. Name the basic types of essays and what they ask the writer to do.
2. Explain the difference between a topic outline and a sentence outline.
3. Every essay should begin with a hook to catch the reader's attention. Name three different
ways you can begin your introduction in order to hook the reader.

Answers

The topic summaries don't provide much information. In contrast, there are many instructive sentence outlines.

The subject outline contains fewer words than sentence outlines, which start each paragraph with a new sentence.

Three common essay hooks include a strong assertion, a provocative inquiry, or a well-known quotation. A strong statement is meant to, in a sense, startle your reader and pique their curiosity in continuing to read to learn how it might be true.

Your reader will be more engaged in reading the essay if you pose a question and make them want to discover the solution. A well-known phrase can also pique the reader's curiosity because they are familiar with it, which increases their desire to read.

To learn more about sentence outlines here:

brainly.com/question/6638703

#SPJ1

2. How were Tenochtitlan affected by the tribute people paid?

Answers

Tenochtitlan's neighbouring conquered city-states were frequently relied upon to provide food for the rising nobility of the Aztec metropolis.

The influx of tribute made the locals affluent (at least the aristocracy). Wealth started to flood into Tenochtitlán as a result of "the Mexica extracting tribute from the subjugated groups and distributing the acquired territory among the victors," according to de Rojas, who also notes that this led to a spike in immigration into the city.

Other typical tribute offerings included armor, animal skins, supplies for construction, ceramics, and fuel. The Aztec economy as a whole benefited from the tribute system since it encouraged trade and transportation between the several city-states in the area, which gave rise to new businesses and a merchant class.

To learn more about Tenochtitlán here:

brainly.com/question/4335196

#SPJ1

WILL GIVE BRAINLIEST pls HELP

which would u rather have on a snowy winter day cozied up at home?
nice burning hot wings, some warm delicious pizza, or warm tasty pasta

Answers

If it is a choosing answer, I would pick delicious pizza.

If you picked burning hot wings it will maybe be burnt.

For warm tasty pasta I will also pick that.

But it is your choice to decide :)

So, I will highly recommend delicious pizza and the tasty pasta.

Hope this helped. :)

I think I would enjoy a plate of wings. Chicken is my favorite food and I feel like I would be craving that on a snowy winter day

Gary is assigned to speak at his school about the 1986 disaster in which the Challenger space shuttle exploded, so he watches the speech President Reagan gave after the tragedy. What are the best ways for Gary to use that speech to ensure his own language will be appropriate to the speaker?

chose that all apply.
A. Study President Reagan's techniques for achieving vividness.

B. Imitate President Reagan, trying to become him, since the 1986 speech was so effective.

C. Try to adapt President Reagan's clarity, blending it with his own style.

D. Borrow President Reagan's style but insert slang to make the language less formal.

Answers

A and C are correct options.

There is no need to imitate Reagon and it will make it just an audio tape. Also, no need to add slangs as there would be teachers and other members there.

Let's use the dictionary Use each of these words in two sentences, first as nouns (naming words) and then as verbs (doing words). Example: There is a fly sitting on the sweets. Eagles fly very high in the sky. 1. light 2. weigh 3. call 4. cook​

Answers

Answer:

1.) Light

As noun:- Akash can barely see his mother in dim light

As verb:- Can anyone please light the candles?

2.) Weigh

As noun:- How much does the chicken weigh?

As verb:- It's better to weigh the luggage before hand.

3.) Call

As verb:- I will call you later when I'm free.

As noun:- Nowadays we have unlimited calls offers so much.

4.) Cook

As noun:- I have the best cook who cooks me delicious meals.

As verb:- I like to cook in my free time.

Explanation:

-> *NOUN* is a word that used to name something such as a place, person, thing etc. *NOUN* can also be used as a subject of the sentance

-> *VERB* describes the action that is going on or has already done or going to do. *VERB* tells about what is happening in the sentance.



To know more about nouns and verbs

Alaska's vast Denali National Park is divided into designated tracts of wilderness, some as big as whole counties. Snowfields and glaciers on the northern face of the Alaska Range mountains feed wide-braided rivers that cut valleys through tundra. The landscape is treeless and trail-less as far as you can see, and far beyond. There are no markers or signposts to designate where one tract ends and another begins. They appear only on maps for the purpose of allotting back-country hiking permits.
A portion of one of the tracts is even more special. It's off-limits. It's called Sable Pass, 60 or so square miles of lumpy tundra protected against human intrusion, except for scientists who have carved themselves an exemption. The purpose is to give wildlife one true sanctuary from people. Sable Pass is in my thoughts because the last of the nation's public lands are in political play these days, and too often we limit the discussion to how these lands should be "used." Backpackers versus Jeeps. Oil drilling versus caribou. Tree cutters versus tree huggers. Jobs versus recreation.
I would feel better about the future if our political debate about public lands accounted for the intangible, but vital, need for wilderness. Not just for nature's sake but for the sake of our souls. Can elk live on pastures with cows? Yes. Can caribou co-exist with oil rigs? They do. Grizzly bears can live in garbage dumps too.
But wilderness, true wilderness, does not exist with cow pastures and oil rigs and garbage dumps. Wilderness is not defined by how it can be used. Like Sable Pass, wilderness is about not using it at all. Except to preserve our diminishing sense of wonder.
8
Based on the tone of this passage, the author is most likely a member of which group?
A.
an organization for farmers
B.
a logging company
C.
a garbage collection agency
D.
a hiking and camping club

Answers

Answer:

D.

a hiking and camping club

Explanation:

This is my perspective on this point of view, it's the hiker's opinion and thoughts based on this passage when he/she goes to the Denali National Park.

Picture for reference

Answers

A. Simple present: The boy is eating ice-cream.  Present progressive: The boy is going to eat the ice-cream.

B. Simple present: Joseph is watching the TV.  Present progressive: Joseph is going to watch the TV.

C. Simple present: You are drinking the milk.  Present progressive: You are going to drink the milk.

D. Simple present: My friends are playing soccer .  Present progressive: My friends are going to play soccer.

E. Simple present: The lawyer is proposing a deal. Present progressive: The lawyer is going to propose a deal.

To know more about Deal:

brainly.com/question/14389313

#SPJ1

It is ironic that Georg and
Ulrich are met by wolves in
the end of the story because
A. Georg and Ulrich keep wolves as pets
B. Georg and Ulrich were hoping wolves would find them
C. Usually Georg and Ulrich hunt animals, and now the animals are hunting them

Answers

It is ironic that Georg and Ulrich are met by wolves in the end of the story because C. Usually Georg and Ulrich hunt animals, and now the animals are hunting them.

What do the wolves represent in The Interlopers?

In The Interlopers, the wolves stand in for the real forest stewards (1919). This follows a disagreement over the forested area in the eastern Carpathian Mountains between Georg Znaeym and Ulrich von Gradwitz.

Irony is a crucial tool used by author Saki in "The Interlopers" to communicate the message that when people harbor resentments, the feud's outcome is frequently terrible. The Gradwitz and Znaeym families, two competing families who dwelt in the Carpathian mountains, are described in the tale.

Therefore, The two main protagonists of "The Interlopers" feel they will be saved, but in the end, they are attacked by wolves, which is an example of situational irony.

Learn more about The Interlopers from

https://brainly.com/question/11131614
#SPJ1

Reread the first two paragraphs of the essay. What does the opening suggest is one of the central ideas of the text?

Answers

Answer: what text?

Explanation:

Hamlet's line in the following passage before going to speak to his mother (3.2.429) mainly suggests that
Let me be cruel, not unnatural. I will speak daggers to her, but use none.
A. he will threaten her with a weapon
OB. he will accuse her of being cruel to him
OC. he will confront her but not hurt her
OD. he will ask her to kill Claudius in revenge

Answers

Hamlet's line in the following passage before going to speak to his mother mainly suggests that  he will confront her but not hurt her

Hamlet is instructed to kill Hamlet's uncle, the new king, in order to exact revenge for his father's death by the spirit of the king. Hamlet poses as insane, muses on life and death, and seeks retribution. In order to save his own life, his uncle also plans to assassinate Hamlet.

Why was Hamlet upset with his mother so much?

By his mother, Hamlet feels misled and annoyed. She married Claudius, the brother of his deceased father, which has devastated him. Hamlet believes that such conditions should not allow for remarriage. Hamlet's dissatisfaction with his mother causes him to become more enraged with Claudius.

To learn more about Hamlet, click the links

https://brainly.com/question/3386851

#SPJ1

Read the questions related to development of ideas and choose the correct answer.
What is volunteering?
How has volunteering evolved over the years?
How does volunteering contribute to the upliftment of the society?
The above process of developing ideas is called
A.)freewriting
B.)brainstorming
C.)mind mapping
D.)tagmemics

Answers

Answer: b

Explanation: It strengthens your ties to the community and broadens your support network, exposing you to people with common interests, neighborhood resources,

- Do you like watching movie?

Answers

Answer:

yes

Explanation:

i like watching movies, because it has lots of interesting plot twists

Yes! I love watching movies as this is one of the best means of entertainment. Moreover, one gets a bundle of information and ideas from a single movie.

I watch movies almost daily because I am alone at home and I have a lot of free time. Sometimes, I even watch the repeated telecast of some of my favorite movies on various TV channels.

You haven't gained enough points to pass the test

Answers

I passed with a 97%
So I'm good
Ohh well very nice ok

Can someone help me
Pls

Answers

Answer:

Question 1.) a sentence filled with action that never ends (i.e. it runs on and on)  //  multiple complete thought mashed together  //  a sentence containing multiple subjects and multiple predicates without any punctuation.

Question 2.) subject + predicate  //  a sentence that is not confusing; a sentence that is easy to understand  //  a sentence that expresses a complete thought.

4.
Are you going bar-hopping with us, or are you going to chicken out?
You’ll either have to get a good job soon or face the fact that you’ll never be successful.

a. False cause (the argument assumes that the order of events alone shows cause and effect)

b. False comparison (the argument assumes that two things being compared are more alike than they really are)

c. Either-or (the argument assumes that there are only two sides to a question)

Answers

Based on the given statement which contains elements of fallacy, the type of fallacy used here is c. Either-or fallacy (the argument assumes that there are only two sides to a question)

What is a Fallacy?

This refers to the logical flaw or improper logic that is used in an argument or statement in order to reach a faulty conclusion about a thing.

Hence, it can be seen that when it comes to the given statement: "Are you going bar-hopping with us, or are you going to chicken out?

You’ll either have to get a good job soon or face the fact that you’ll never be successful.", there is the use of either or fallacy which gives only two sides

Read more about fallacies here:

https://brainly.com/question/20939336

#SPJ1

my sister.... three languages
a.speaks b.is speaking c.speak​

Answers

Answer:

Speaks

my sister speaks three languages.

My sister speaks three languages. Therefore, option A is correct.

What is language ?

A language is a way of speaking or writing that is used by the citizens of a certain nation or region. It is made up of a set of sounds and written symbols.

A structured system of communication is language. A language's grammar is its structure, while its vocabulary is its free-form elements. Humans primarily communicate through languages, which can be expressed in a number of ways, including spoken, sign, and written language.

The four language abilities are speaking, listening, writing, and reading. In every language, the first two abilities appear to be the most fundamental. The first two linguistic abilities that people learn when learning a language are speaking and listening.

Thus, option A is correct.

To learn more about language, follow the link;

https://brainly.com/question/20921887

#SPJ2

If you take your old books--------- sell them.

Answers

THIS IS NOT A REAL QUESTION

What are main themes to The Last Dog by Katherine Patterson

Answers

Persistence—never giving up no matter what the circumstances or challenges—is the story's central message. The youthful Brock is followed on his exploration of the dystopian planet outside the dome in Katherine Paterson's "The Last Dog."

Brock was instructed inside the dome that there was no life outside of it. However, Brock's discovery of an earth that closely resembles our planet today disproves this theory.

In The Last Dog on Earth, the effects of sickness and public and political panic are essentially the main topics. Logan and Jack are in danger even though they are not afflicted because of the epidemic's ravaging fear in society.

To learn more about The Last Dog here:

brainly.com/question/25083191

#SPJ1

Write a paragraph explaining how "The Bells" fits the category of Gothic literature. To support your answer, use at least one of the words, phrases, or poetic devices you've described.

Answers

The bell fits in to Gothic literature of how narrator detailed his emotions using different sounds and imageries.

The poet uses each stanza to describe his emotions. The first part describes the positive and uplifting atmosphere. He uses images of the “icy air of nights” and the “stars that oversprinkle the sky.

He deploys repetition to bring rhythm to the poem where he says“Keeping time, time, time” and “As he knells, knells, knells”.

Gothic Literature is a genre that places strong emphasis on intense emotion, pairing terror with pleasure, death with romance. In The bell the author is very descriptive in the terror and sadness that the last sound generates in

the narrator, which represents death.

Learn more about Gothic literature here

https://brainly.com/question/24161357

#SPJ1#

which two words mean the same as compose as it is used in sentence

Answers

Answer:

Consist, comprise and compose are all verbs used to describe what something is 'made of'.

Help me quick please!

How does Susan's cultural background affect her actions in "Hamadi"?

Answers

Answer: How does Susan change throughout the story in Hamadi?

She is a complex character in this story because she has many different relatable traits, has many thoughts and relationships in the story and changes throughout the story. One thing that is instantly noticeable about Susan is that she is becoming curious of the world and depressed as she grows older.

She is a complicated character in this story because she possesses a wide range of recognizable traits, has several interactions and thoughts, and undergoes development throughout the narrative. One thing about Susan that stands out right away is how she is maturing into a worldly-curious and unhappy young woman.

What is cultural background?

Your social and racial background, financial condition, and type of work experience can all be mentioned. The context of a person's life experience as it is influenced by membership in groups based on ethnicity, race, social status, gender, abilities, language, religion, sexual orientation, and place of residence.

A cultural identity essay investigates and describes how, among other things, your upbringing—including your childhood geography, race, religion, socioeconomic status—shaped your sense of self.

Thus, She is a complicated character in this story.

For more information about cultural background, click here:

https://brainly.com/question/10169330

#SPJ2

Change into active voice

The winning runs was scored by Vikas Joshi, playing his first international match.​

Answers

Answer:
"Vikas Joshi scored the winning run in his first international match."
Explanation:
To make it into active voice you need to change the subject into performing the action. Which its Vikas Joshi scoring the winning run. So, we get Vikas Joshi scored the winning run. Now we need to include that it was during his first international match so we get:
"Vikas Joshi scored the winning run in his first international match."

What have you been doing to prepare for your future job

Answers

I wanted to an artist but my parents aren't happy about it so I'm focusing more on math since I'm sure I won't be able to take science,I practice math everyday and whenever I get time.

Can someone help mee

Answers

The 3 , i create.






Xdddd

Someone help me with this

Answers

The complete sentence is; "Everyday Daedalus put seed on the windowsill for the birds. He envied them because they were free to fly away".  

A complete sentence is made up of a main clause and, on occasion, one or more auxiliary clauses. Sentences normally have a subject and a predicate and express a statement, question, exclamation, or command.

The swift brown fox jumps over the lethargic dog is an example of a sentence in English. A sentence is a linguistic statement in linguistics and grammar. It is often described in classical grammar as a set of words that expresses a full thought or as a unit made up of a subject and predicate.

Hence the correct answer is option B.

To learn more about sentence here:

brainly.com/question/14670116

#SPJ1

Other Questions
Find a b and c ?????? How does the use of repetition help the author shape the tone of the poem?A. The repetition in the poem reflects the speaker's emotions about her own experience.B. The repetition in the poem contrasts the teacher and the speaker.C. The repetition in the poem shows how the speaker struggles with words.D. The repetition in the poem shows how excited the speaker is write a short narrative describing your morning this morning. it must include both simple and compound subjects. it must include nouns, pronouns, and at least one verbal acting as a subject To find the quotient Three-fourths divided by one-eighth, which sections are identical under the direct and indirect method of the statement of cash flows? (select all that apply.) multiple select question. cash from financing activities cash from investing activities cash from operating activities What was Akhet? aThe harvest seasonbThe god of the Nile RivercThe dry seasondThe flooding season Una barra de fierro tiene 3,5 metros de largo. en un punto de la barra se ubica una marca que dista 125cm de uno de los extremos.cuanto dista en dm del otro extremo? What is the velocity (in m/s) of a 0.179kg billiard ball of its wavelength is 7.83cm A solution is prepared by dissolving 15. 0 g of nh3 in 250. 0 g of water. The density of the resulting solution is 0. 974 g/ml. What is the mole fraction of nh3 in the solution?. (On turning ten) What is the speaker's primary purpose for writing this poem?To tell about a time the speaker was sickTo show the foolishness of childhoodTo show the maturation from the simplicity of childhood to the understanding ofadulthoodTo entertain the reader with nostalgic anecdotes (3x + 8)(5x 20)(5x + 4y)Find the value of each variable. Complete avoidance of all alcoholic beverages is the only way for most people who abuse alcohol to achieve full and ongoing recovery. a.true b.false you have just been hired by the u.s. government to analyze the following scenario. suppose the u.s. automobile industry is concerned about foreign car producers exporting their goods to the united states, a practice that hurts domestic producers. lobbyists claim that implementing a quota on imports would shrink the size of the trade deficit. the following exercise will help you to analyze this claim.you have just been hired by the u.s. government to analyze the following scenario. suppose the u.s. automobile industry is concerned about foreign car producers exporting their goods to the united states, a practice that hurts domestic producers. lobbyists claim that implementing a quota on imports would shrink the size of the trade deficit. the following exercise will help you to analyze this claim. an object is traveling at the steady speed of 8 and 2/3 mph how long will it take the object to travel 5 and 1/5 miles Evaluate ca+bd if a=7/8 , b=7/16 , c=0.8 , and d=1/4 how many solutions does 12 + 2x - x = 9x + 6 have?? giving brain and max points which of the following is an independent agency?a. The General Services Administrationb. The Small Business Administrationc. The Office of Personnel Managementd. The Consumer Product Safety Commissione. The Federal Deposit Insurance Corporation How were the Philippines, Cuba, and Hawaii strategically similar in the eyes ofthe United States? Decide if the following sentence is grammatically correct or incorrect. Estas archivos son tuyos. How does "If the measure of an angle is not 180, then it is not a straight angle" relate to the conditional statement "If an angle is a straight angle, then its measure is 180."CounterexampleConverseInverse Contrapositive