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

One rule in the Java programming language is that you have to place a semicolon at the end of each statement. What is this rule

an example of?
Group of answer choices

a database

a data structure

syntax

binary code
Computers and Technology
2 answers:
slavikrds [6]3 years ago
8 0

Answer:

A data structure if I'm correct.

Explanation:

The computer would need to know when one command is over, as you can write code like this,

ellipse(20, 20, 20, 20);fill(255, 0, 240);

and without the semicolon it would end up looking like this,

ellipse(20, 20, 20, 20)fill(255, 0, 240)

and the computer would not know when you've stopped creating the circle and when you've started to color it.

Y_Kistochka [10]3 years ago
5 0
I think binary code is an example of it.
You might be interested in
A(n) ____ consists of a series of related instructions, organized for a common purpose, that tells the computer what tasks to pe
yarga [219]

Answer:

The correct answer is "Program".  

Explanation:

Program is the collection of statement or instruction which is developed for creating any software or any purpose. The program is implemented or executed by a computer to perform a particular task.The particular programmer always writes an instruction to develop a program.

Program are always organized for the common purpose, that specifies the computer what tasks to perform as well as how to perform that particular task for example if programmer develops a program of calculator then it should be only used for the calculation purpose.

7 0
3 years ago
Write a Java program that reads two numbers from the console. Based on the example in the textbook, write five methods (min, max
makvit [3.9K]

Answer:

import java.util.Scanner;

public class num6 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter first number");

       int a = in.nextInt();

       System.out.println("Enter second number");

       int b = in.nextInt();

       //Calling the methods inside the output statement

       System.out.println("Min is "+min(a,b));

       System.out.println("Max is "+ max(a,b));

       System.out.println("Sum is "+sum(a,b));

       System.out.println("Product is "+product(a,b));

       System.out.println("Absolute difference is "+difference(a,b));

   }

   //Min Method

   static int min(int a, int b){

       if (a<b){

           return a;

       }

       else {

           return b;

       }

   }

   //Max Method

   static int max(int a, int b){

       if (a>b){

           return a;

       }

       else {

           return b;

       }

   }

   //Sum Method

   static int sum(int a, int b){

       return a+b;

   }

   //Diference Method

   static int difference(int a, int b){

       int diff = Math.abs(a-b);

       return diff;

   }

   //Product Method

   static int product(int a, int b){

       int prod = a*b;

       return prod;

   }

}

Explanation:

  • Using Java programming language
  • Use the scanner class to prompt and receive two values from the user (integers a and b)
  • Create the four methods as required (Please see the comments in the code)
  • In the difference method use Math.abs() to get the absolute value of the subtraction ensuring that you get a positive number returned
4 0
2 years ago
Read 2 more answers
What website or search engine that helps people find the web pages that they are looking for by tying in the subject they want?​
Effectus [21]

Amazon can be use to search

4 0
3 years ago
Anyone have the Dell xps 13 laptop? if not pls don't answer but if you do, how is it going for you?​
Nady [450]

I do and it’s going alright; would recommend. Here’s what I think in bullet points.

- Good aesthetic design. Weave-like texture is nice and somewhat opulent.

- Good performance; you can overclock the i7 CPU.

- Battery life is at the upper end of the spectrum.

- No USB Type A Ports, big downside.

- Graphics are about 1000 points above industry average (3D Mark Fire Spark)

- Uses an SSD rather than a HDD; much quicker load time.

- I’d go for the $1,899 personally; it’s worth the extra money.

Thanks.

3 0
2 years ago
Read 2 more answers
Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The user shoul
iVinArrow [24]

The do-while loop for the given problem is shown below.  

do  

{  

  // user asked to enter two numbers  

  cout<<"Enter two numbers to be added."<<endl;  

  cin>>num1;  

  cin>>num2;  

  sum = num1 + num2;  

 

  // sum of the numbers is displayed  

  cout<<"Sum of the two numbers is "<<sum<<endl;  

  // user asked whether to perform the operation again  

  cout<<"Do you wish to continue (y/n) ?"<<endl;  

   cin>>choice;  

}while(choice != 'n');  

The variables to hold the two numbers and their sum are declared as float so that the program should work well for both integers and floating numbers.

float num1, num2, sum;

The char variable is taken since it holds only a single-character input from the user, 'y' or 'n'.

char choice;

The whole program is given below.

#include <iostream>

using namespace std;

int main() {

float num1, num2, sum;

char choice;  

do  

{  

  // user asked to enter two numbers  

  cout<<"Enter two numbers to be added."<<endl;  

  cin>>num1;  

  cin>>num2;  

  sum = num1 + num2;  

  // sum of the numbers is displayed  

  cout<<"Sum of the two numbers is "<<sum<<endl;  

  // user asked whether to perform the operation again  

  cout<<"Do you wish to continue (y/n) ?"<<endl;  

  cin>>choice;  

}while(choice != 'n');

cout<<"Quitting..."<<endl;

}

5 0
3 years ago
Other questions:
  • If you want to be more efficient at using the World Wide Web, refresh the page often.
    7·1 answer
  • An identifying value called a/an ____ is assigned by the java runtime to an object when it is created, to allow the java runtime
    14·1 answer
  • On your Windows server, you’re planning to install a new database application that uses an enormous amount of disk space. You ne
    11·1 answer
  • Networks that are designed to connect similar computers that share data and software with each other are called:
    10·1 answer
  • Primary technology skills are skills that are necessary for success in online education
    9·2 answers
  • Given the following schedule, show the locks that will occur and the subsequent schedule. Assume that strict 2PL is in effect, w
    13·1 answer
  • To date, what has most propelled the digital revolution?
    10·1 answer
  • Which of the following is not a data visualization technique?
    6·1 answer
  • During the preventive maintenance phase of a project involving a hydraulic power system, an engineer must change a gasket on a p
    14·1 answer
  • What is the value of x after running this code?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!