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
coldgirl [10]
2 years ago
13

Consider the following code segment. int j = 10; int k = 8; j += 2; k += j; System.out.print(j); System.out.print(" "); System.o

ut.println(k); What is printed when the code segment
Computers and Technology
1 answer:
lubasha [3.4K]2 years ago
8 0

Answer:

Following are the output of the given code:

Output:

12 20

Explanation:

Description of the code:

  • In the java program code, two integer variable "j and k" is defined, that stores a value, that is "10 and 8", in its respective variable.
  • After storing the value it uses the "j and k" variable, in this, it increments the value of j with 2, and in the k variable, it adds the value of j and stores the value in k.
  • After incrementing the value, the print method is used that prints the value of "j and k", i.e, "12 and 20".
You might be interested in
Types of Computer games​
kiruha [24]

\bold{Hello}~

\bold{Answer:}

<h3>Types of Computer games</h3>
  • Action
  • Adventure
  • Simulation
  • Sports
  • Role-playing
  • Puzzlers
  • Party games

<em>(</em><em>That's</em><em> </em><em>all</em><em> </em><em>i</em><em> </em><em>know</em><em>)</em><em> </em>

<h2>#Hopeithelps\:</h2>

\bold{-Kei}~

\tiny\sf\purple{ ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ }

5 0
2 years ago
Modify the Comments.java program from Programming Exercise 1-10 so at least one of the statements about comments is displayed in
Zielflug [23.3K]
This isn’t even a question it’s just instructions for a question. can you elaborate???
4 0
2 years ago
___________ is a task pane used to correct grammar errors; opens when you click the Spelling &amp; Grammar button in the Proofin
BaLLatris [955]

Answer:

Spelling Task Pane

Explanation:

According to my research on Microsoft Office Studio, I can say that based on the information provided within the question the feature being mentioned in the question is called the Spelling Task Pane. By selecting this pane word will offer various grammar and spelling assistance, such as correcting words and offering one or more suggestions.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Read 2 more answers
When an event occurs, the agent logs details regarding the event. what is this event called?
Nimfa-mama [501]

If an event occurs, the agent logs details regarding the event. what is this event called GET.

The information in the agent log file is known to be the beginning of the log file, which is stated to show the agent's launch and handling of the services and configuration settings.

Keep in mind that the agent log also contains a history of the activities performed by the agent during runtime, along with any errors, and that it is utilised to investigate deployment issues.

As a result, if an event happens, the agent logs information about it. What is this GET event, exactly?

The agent monitoring services' startup and configuration settings are displayed at the log file's beginning. The sequence of agent runtime activity and any observed exceptions are also included in the agent log.

Learn more about agent logs:

brainly.com/question/28557574

#SPJ4

8 0
1 year ago
Create an array of numbers filled by the random number generator. (value = (int)(Math.random() * 100 + 1);) Print the array and
Y_Kistochka [10]

Answer:

Explanation:

the following is the code to run this (JAVA)

MeanStandardDev.java

import java.util.Random;

import java.util.Scanner;

public class MeanStandardDev {

public static void main(String[] args) {

// Declaring variables

int N;

double lower, upper, min, max, mean, stdDev;

/*

* Creating an Scanner class object which is used to get the inputs

* entered by the user

*/

Scanner sc = new Scanner(System.in);

// Getting the input entered by the user

System.out.print(" How many Random Numbers you want to generate :");

N = sc.nextInt();

System.out.print("Enter the Lower Limit in the Range :");

lower = sc.nextDouble();

System.out.print("Enter the Upper Limit in the Range :");

upper = sc.nextDouble();

// Creating Random class object

Random rand = new Random();

double nos[] = new double[N];

// this loop generates and populates 10 random numbers into an array

for (int i = 0; i < nos.length; i++) {

nos[i] = lower + (upper - lower) * rand.nextDouble();

}

//calling the methods

min = findMinimum(nos);

max = findMaximum(nos);

mean = calMean(nos);

stdDev = calStandardDev(nos, mean);

//Displaying the output

System.out.printf("The Minimum Number is :%.1f\n",min);

System.out.printf("The Maximum Number is :%.1f\n",max);

System.out.printf("The Mean is :%.2f\n",mean);

System.out.printf("The Standard Deviation is :%.2f\n",stdDev);

}

//This method will calculate the standard deviation

private static double calStandardDev(double[] nos, double mean) {

//Declaring local variables

double standard_deviation=0.0,variance=0.0,sum_of_squares=0.0;

/* This loop Calculating the sum of

* square of eeach element in the array

*/

for(int i=0;i<nos.length;i++)

{

/* Calculating the sum of square of

* each element in the array    

*/

sum_of_squares+=Math.pow((nos[i]-mean),2);

}

//calculating the variance of an array

variance=((double)sum_of_squares/(nos.length-1));

//calculating the standard deviation of an array

standard_deviation=Math.sqrt(variance);

return standard_deviation;

}

//This method will calculate the mean

private static double calMean(double[] nos) {

double mean = 0.0, tot = 0.0;

// This for loop will find the minimum and maximum of an array

for (int i = 0; i < nos.length; i++) {

// Calculating the sum of all the elements in the array

tot += nos[i];

}

mean = tot / nos.length;

return mean;

}

//This method will find the Minimum element in the array

private static double findMinimum(double[] nos) {

double min = nos[0];

// This for loop will find the minimum and maximum of an array

for (int i = 0; i < nos.length; i++) {

// Finding minimum element

if (nos[i] < min)

min = nos[i];

}

return min;

}

//This method will find the Maximum element in the array

private static double findMaximum(double[] nos) {

double max = nos[0];

// This for loop will find the minimum and maximum of an array

for (int i = 0; i < nos.length; i++) {

// Finding minimum element

if (nos[i] > max)

max = nos[i];

}

return max;

}

}

the OUTPUT should give;

How many Random Numbers you want to generate :10

Enter the Lower Limit in the Range :1.0

Enter the Upper Limit in the Range :10.0

The Minimum Number is :1.1

The Maximum Number is :9.9

The Mean is :6.30

The Standard Deviation is :2.98

cheers i hope this helps!!!

4 0
3 years ago
Other questions:
  • Which website allows you to host your podcast for at a cost that includes your domain name?
    9·2 answers
  • What are the pasting options in Outlook 2016? Check all that apply.
    10·2 answers
  • What does the minimum password age setting control?
    15·1 answer
  • YOU WANT TO DISCARD YOUR OLD COMPUTER AND WANT TO SECURELY ERASE THE DATA FROM YOUR HARD DRIVE. WHAT SOFTWARE CAN YOU USE AND WH
    9·2 answers
  • ______ are used to store all the data in a database.
    7·1 answer
  • All of the following are helpful tips for protecting your digital privacy, except:
    10·2 answers
  • What is the answer 11100+01010​
    8·1 answer
  • Choose all that apply.
    5·2 answers
  • A global clothing company is looking to create a more immersive shopping experience for customers.What is a way the company can
    14·2 answers
  • You are the Emergency Management Director of a small island nation. Your nation has come under Cyber-attack and the attackers ha
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!