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
marusya05 [52]
3 years ago
10

How do you write java

Computers and Technology
1 answer:
pantera1 [17]3 years ago
7 0
Https://www.google.com/amp/m.wikihow.com/Write-Your-First-Program-in-Java%3Famp%3D1
You might be interested in
Write a program that will remove "May" from the list using .Pop and .Index methods.(5pts) GIVEN: lst=["January", "February", "Ma
Inga [223]

Answer:

This question is answered in Python

lst=["January", "February", "March", "April", "May", "June"]

index = lst.index('May')

lst.pop(index)

print(lst)

Explanation:

This initializes the list

lst=["January", "February", "March", "April", "May", "June"]

This gets the index of May

index = lst.index('May')

This removes "May" from the list using pop()

lst.pop(index)

This prints the updated list

print(lst)

5 0
3 years ago
What is output by the following C# code segment?int temp;temp = 180;while ( temp != 80 ) {if ( temp > 90 ) {Console.Write( "T
Artemon [7]

Answer:

This porridge is too hot! This porridge is just right!

Explanation:

I am going to explain every line of the given C# code to give explanation of the output.

  • The first statement int temp declares a variable temp.
  • Then the temp variable is assigned a value 180.
  • The block of statement in while loop body will keep executing until the value in temp variable gets equal to 80. The while loop first checks if the value of temp is not equal to 80. As the value of temp=180 which is not equal to 80, this means that the condition of while loop evaluates to true so the block of code in the body of the loop is reached.
  • There is an if condition inside while loop which checks if the value in temp variable is greater than 90. As value of temp=180 which is greater than 90 so the condition is true.
  • As the condition in the if statement evaluates true so the block of code which is the part of this if statement will be executed:

             {Console.Write( "This porridge is too hot! " );

                  temp = temp – ( temp > 150 ? 100 : 20 ); }

  • The first statement is executed which displays this message: This porridge is too hot!
  • Next   temp = temp – ( temp > 150 ? 100 : 20 ); statement will change the value of temp. It has the conditional operator which works as follows:

                 Here, temp>150 is the condition to be evaluated.

  • If this condition is True then 100 will be returned else 20 will be returned. The value returned is then subtracted from the value of temp and the subtraction result will become the new value of temp. As the value of temp which is 180 is greater than 150 so 100 is returned and is subtracted from the value of temp (180).

                                        temp= 180-100

                                             temp=80

  • So the new value of temp is 80.
  • The else part will not be executed because the condition in if statement was true and also we can see that temp is not less than 70. It means that the porridge is too cold part will not be executed.
  • The while loop while(temp!=80) will again be checked. As the new value of temp is now 80, so the condition gets false which breaks the while loop and program control will leave the body of while loop.
  • After the control comes out of the while loop, there is another if statement. This statement checks if the value of temp variable is equal to 80. It is true as the new value of temp is now 80 after that execution of while loop block of code.
  • As the if condition evaluates to true the statement

                    Console.WriteLine( "This porridge is just right!" );

       will be executed which displays the message:

                                  This porridge is just right.

  • Hence the output of the given code is:

           This porridge is too hot! This porridge is just right!

7 0
3 years ago
What career cluster does a fish and game warden fall in?
Andrej [43]
The answer is Law, Public safety, Corrections & Security career cluster.

This cluster is organized into several career paths that include emergency and fire management, Law enforcement services, legal and correction services. Fish and Game Wardens main tasks include, investigate hunting accidents or reporting of fish or game law violations and preserve native wildlife and ecosystems.





7 0
3 years ago
One way bloggers decide how to present information is by understanding
PSYCHO15rus [73]

I would say strong use of multimedia.

4 0
3 years ago
Read 2 more answers
Create a new Die object. (Refer to Die.html for documentation.)Create a loop that will iterate at least 100 times. In the loop b
hjlf

Answer:

Java code is given below

Explanation:

import java.util.Random;

class Die{

private int sides;

public Die(){

sides = 6;

}

public Die(int s){

sides = s;

}

public int Roll(){

Random r = new Random();

return r.nextInt(6)+1;

}

}

class DieRoll{

public static void main(String[] args) {

Die die = new Die();

int arr[] = new int[6];

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

arr[i] = 0;

for(int i=0; i<100; i++){

int r = die.Roll();

arr[r-1]++;

}

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

System.out.println((i+1)+" was rolled "+arr[i]+" times.");

}

}

8 0
3 years ago
Other questions:
  • Melissa and Sue want to show a presentation to twenty employees using a presentation while using a projector. They learn that th
    12·2 answers
  • Given that arrayIntValues [MAX_ROWS][MAX_COLUMNS] is a 2 dimensional array of positive integers, write a C++ function Even to fi
    15·1 answer
  • 11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
    6·1 answer
  • Which of the following types of network can only be accessed by members within a private organization?
    5·1 answer
  • Identify a factor that is unlikely to influence the length of time people wait in the lunch line.
    8·2 answers
  • CAN SOMEONE PLEASE DO THESE FOR ME I WILL GIVE BRAINLIESR AND 20 POINTS PLEASE ITS ONLY 5 QUESTIONS PLEASEEEE
    12·1 answer
  • Which of the following are acceptable to share? Check all of the boxes that apply.
    13·1 answer
  • Sustainable development is a goal towards which all human societies need to be moving. elaborate the statement in about 120 word
    9·1 answer
  • Draw a flow chart to access the marks of three students. calculate the total avarage and display the result​
    11·1 answer
  • Escribe 10 ejemplos de lo que consideras un byte
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!