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
a_sh-v [17]
3 years ago
11

Given a String variable named line1 and given a Scanner reference variable stdin that has been assigned a reference to a Scanner

object, read the next line from stdin and save it in line1. (Do not concern yourself with any possible exceptions here-- assume they are handled elsewhere.)
Computers and Technology
1 answer:
Anna35 [415]3 years ago
4 0

Answer:

Scanner stdlin = new Scanner(System.in);

line1 = stdlin.readline();

Explanation:

1.stdlin is the referenced input variable made by using built in Scanner class of Java language.

2.Than in line1 the next line from the console will be assigned by using readline function.

You might be interested in
Create a statement that always returns the names of the three criminals with the highest number of crimes committed.
AlekseyPX

Answer:

SELECT TOP 3 crimes_committed FROM criminals_and_crimes

Explanation:

Assuming the questions requires an SQL statement, we need to order the list of the criminals by the number of crimes committed.

Let's assume the criminal names are stored under criminal_name and number of crimes committed is stored under num_of_crimes in a list named criminals_and_crimes

We can write:

SELECT TOP 3 crimes_committed FROM criminals_and_crimes

for MySQL.

I hope this answer helps.

5 0
3 years ago
Write a recursive decent algorithm for a java while statement, a Javas if statement , an logical/mathematical expression based o
Aleonysh [2.5K]

Using the knowledge in computational language in JAVA it is possible to write a code that recursive decent algorithm for a java while statement, a Javas if statement , an logical/mathematical expression.

<h3>Writting the code in JAVA:</h3>

<em>M ---> { S } ' # '</em>

<em>S ---> I | W | A | P | C | G</em>

<em>I ---> ' [ ' E ' ? ' { S } ' : ' { S } ' ] ' | ' [ ' E ' ? ' { S } ' ] '</em>

<em>W --- > ' { ' E ' ? ' { S } ' } '</em>

<em>A --- > lower-case ' - ' E ' ; '</em>

<em>P --- > ' < ' E ' ; '</em>

<em>G ---> ' ' . ' lower case ' ; '</em>

<em>C ---> ' < ' upper case ' ; '</em>

<em>E ---> T { ( ' + ' | ' - ' ) T }</em>

<em>T ---> U { ( ' * ' | ' / ' | ' % ' ) U }</em>

<em>U ---> F ' ^ ' U | F</em>

<em>F ---> ' ( ' E ' ) ' | lower case | digit</em>

<em>Here "lower-case" stands for a single lower-case letter, and "upper-case" stands for a single upper-case letter. For a more colorful grammar (in a slightly different form), see colorful grammar.</em>

<em>This grammar (and the language it defines) may look a little strange, but it was designed to have only single-character tokens. In particular it doesn't have any reserved words (key words), though in a sense the upper-case letters are reserved.</em>

<em>Just to help with understanding, here is the intuitive meaning of each of the above non-terminals:</em>

<em>SYMBOL MEANING</em>

<em>M Main Program</em>

<em>S Statement</em>

<em>I If-Then-[Else] Statement</em>

<em>W While Statement</em>

<em>A Assignment Statement</em>

<em>P Put or Print (integer)</em>

<em>C Print Character</em>

<em>G Get (integer)</em>

<em>E Expression (logical or arith)</em>

<em>T Termi</em>

<em>U </em>

<em>F Factor</em>

See more about JAVA at brainly.com/question/12975450

#SPJ1

3 0
2 years ago
HELP ASAP!! Ohms law homework
kvv77 [185]

4a)

According to Ohm's law (Current) = (Voltage)/(Resistance)

Given the values: (Current) = 9V / 470 Ohm = 19.1 mA

The current through the LED is 19.1mA, or 0.019A

4b)

(max current) = (voltage)/(min resistance) =>

(min resistance) = (voltage)/(max current) = 6V / 0.05 A = 120 Ohm

The resistor must be at least 120 Ohm, otherwise the LED will fry.

8 0
3 years ago
Brooke is trying to save enough money in the next fifteen months to purchase a plane ticket to Australia. Every month Brooke sav
vlada-n [284]

Answer:

This program required for loop and three variables are declared and initialized. then for loop is use to calculate the saving of 15 months.

The description of each line of code is given below in explanation section. However, it is noted that this program is implemented in C++ programming language using Dev C++.

Explanation:

#include <iostream>

using namespace std;

int main()// program started

{

int totalSaving=0;// total saving at the end of each month  

int monthlySaving=100;// each month saving  

int totalMonth2Save=15;// total month in which he can save

 

for (int i=1; i<=totalMonth2Save;i++)// for loop to count saving for 15 month

{

 totalSaving= totalSaving + monthlySaving;// add the saving of each month into total saving

 

}

cout<<"Total saving at the end of 15th month is ";// display the message  

cout<<totalSaving;//of total 15 month saving  

cout<<"$";// show the currency symbol

 

return 0;

}

4 0
3 years ago
A switch to kernel mode, wherein the operating system performs some action before returning control to the originating process?
ELEN [110]

A switch to kernel mode, wherein the operating system performs some action before returning control to the originating process is known to be called trap.

<h3>What is TRAP in computing?</h3>

A trap is known to be a kind of a synchronous interrupt triggered that is said to be done by an exception in that of a user process to carry out functionality.

Note that the Exception conditions such as invalid memory access, division by zero, is said to be one that can alter or  trigger a trap in an OS. A trap alters the mode of an OS to that of a kernel routine.

Hence, A switch to kernel mode, wherein the operating system performs some action before returning control to the originating process is known to be called trap.

Learn more about operating system from

brainly.com/question/22811693

#SPJ4

3 0
2 years ago
Other questions:
  • It is either snoming or below freezing
    10·1 answer
  • The following statement should determine if count is within the range of 0 through
    5·1 answer
  • What will the following loop display? 0 1 2 3 4 5 0 1 2 3 4 0 1 2 3 4 The loop will display numbers starting at 0, for infinity.
    8·1 answer
  • To select an unselected text object, press [____], click the text object, and then release [____].
    8·1 answer
  • Consider the following relationship involving two entities, students and classes:A student can take many classes. A class can be
    9·1 answer
  • What type of simple machine is a steel bolt?
    9·1 answer
  • True or False: Wikipedia is a reliable source. ​
    5·2 answers
  • Pleaseeeeeeee tellllllllllllllllllllll​
    8·1 answer
  • Imagine that you are preparing a multimedia presentation. What are the four things you need to consider when getting started?
    14·2 answers
  • Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of th
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!