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
abruzzese [7]
3 years ago
15

In JAVA, answer the following:

Computers and Technology
1 answer:
erica [24]3 years ago
7 0

Answer:

The JAVA program is as follows.

import java.util.Scanner;

public class Program

{

   static int n;

public static void main(String[] args) {

    //scanner object

    Scanner stdin = new Scanner(System.in);

    //loop executes till number entered is in the range of 1 to 10

    do

    {

        System.out.print("Enter any number: ");

        n = stdin.nextInt();

    }while(n<1 || n>10);

    System.out.println("Number is valid. Exiting...");

}

}

OUTPUT

Enter any number: 0

Enter any number: 23

Enter any number: 10

Number is valid. Exiting...

Explanation:

The program is explained.

1. The integer variable, n, is declared static since the variable should be accessible inside main() which is static.

2. An object of Scanner, stdin, is created inside main().

3. Inside do-while loop, the user is asked input any value for n.

4. The loop continues till user inputs a number which is not in the given range, beginning from 1 to 10.

5. The loop will not be terminated till the user enters a valid input.

6. Once a valid input is entered, the message is displayed to the console and the program ends.

7. The variable, n, is declared at the class level and is a class variable. Class variables are declared inside the class but outside all the methods in that class.

8. Since JAVA is a purely object-oriented language, all the code is written inside class.

9. The object of class is not created since only one class is included in the program. If more than one class is included, then the object of the class which does not has the main() method will be created inside main().

10. User input for integer is taken via scanner object and using nextInt() method.

11. The methods, print() and println() display the messages to the console. The only difference is that println() inserts a new line after displaying the message.

12. The name of the class having main() and the name of the program should be the same.

You might be interested in
IF YOUR ANSWER IS GOOD I WILL MARK BRAINLIEST PLEASE ANSWER!!!
Ket [755]

Answer: You must have the right soffware  have the right research and have the right website.

Explanation: You need the right website or you interview will be messed up.

5 0
2 years ago
Discuss Batch Processing clearly showing the advantages and disadvantages
vazorg [7]

Answer:

Batch Processing is the processing of previously collected jobs in a single batch.

Explanation:

Some advantages would be that a data center's staff can schedule batch processing during times when the computers are otherwise idle, such as overnight, The computer operators can delay or prioritize different batches easily, and computer files containing commands, programs and data; once created, some can be run repeatedly as needed, adding convenience for the staff and helping keep processing costs low.

Some disadvantages would be that all of a batch job's input data must be ready before the computer can run it, problems with data, errors and program crashes that occur during batch jobs bring the whole process to a halt, and the inputs must be carefully checked before the job can be run again.

https://www.techwalla.com/articles/advantages-disadvantages-of-batch-processing

5 0
3 years ago
You're installing two new hard drives into your network attached storage device. Your director asks that they be put into a RAID
bekas [8.4K]

Answer:

d. RAID 6

Explanation:

RAID is a data storage technology that combines multiple physical disk drive components into a single logical unit. The functions of RAID is to provide performance and redundancy.

RAID 0 provides data stripping but it does not offer data stripping.

RAID 1 increases performance to about 2x but it limits the disk capacity to about 50%

RAID 5 provides redundancy and increased perfomance but it is limited to small disk drive.

RAID 6 also provides redundancy but it slows performance

RAID 10 increases performance and data protection.

RAID 6 is the best drive that offers redundancy over performance.

8 0
3 years ago
Which of these describes, in increasing order, the file sizes of the same image in different formats? Group of answer choices
Nesterboy [21]

Answer:

If left being the shortest file size and right being the biggest file size...

It is JPEG, PNG, TIFF.

Explanation:

TIFF is used primarily for editing photos or for uncompressed high quality images for things like 4K textures. The file size will be bigger since generally it is uncompressed.

PNG reserves the maximum quality of the image and can not be compressed. (It can be compressed but the results are very minimal).

JPEG allows for the user to decide the compression and quality of the image. JPEG also doesn't hold transparency data, thus making JPEG generally use less space than PNG and definitely more than TIFF.  

8 0
3 years ago
A website can contain a web form to collect registration details of a member who sign up to the website.
Vaselesa [24]

Answer

What you are needing here is a Point of entry system for website.

You can do this with Wordpress - where users can register to access. They sign up using wordpress and it's many plug ins.

They would have to choose a email and password to register and that would give them requirements to log back in.

WIth a password to their email you would be able to tell exactly how many times the came in and out of the website.  

Explanation:

5 0
3 years ago
Other questions:
  • To join a social network you create an avatar
    12·2 answers
  • What type of data visual would you use to illustrate trends over time? Gantt chart Bar graph Line chart Scatter diagrams
    5·1 answer
  • When assembling a desktop computer you should always install the drives before the motherboard?
    9·1 answer
  • A tooltip is a _____________ that allows the programmer to create a small popup message that displays when the user places the m
    12·2 answers
  • Increasing your margins will increase the amount of space you have to type text on your document. Please select the best answer
    10·1 answer
  • Now suppose that the file is broken into 5 packets, each of 10 Mbits. Ignore headers that may be added to these packets. Also ig
    14·1 answer
  • Users of Adobe Reader, created by Adobe Systems Incorporated, are prompted to provide feedback on their experiences with the sof
    7·1 answer
  • During the design phase of the systems development life cycle (SDLC), the _____ design is created for a specific platform, such
    8·1 answer
  • What was original name<br> whoever answers first gets brainly crown
    9·1 answer
  • Any idea how to make my simple python projects such as guess the number, mad libs, etc. even better?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!