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
JulsSmile [24]
2 years ago
10

Select the correct line of missing code to create an output of "hello."

Computers and Technology
1 answer:
s2008m [1.1K]2 years ago
3 0

Answer:

B

Explanation:

This feels like an error on the question issuer's part.

You might be interested in
Imagine the user types in a complete sentence, but we want to read only the first word and place it in the String variable word.
Vladimir [108]

Answer:

import java.util.Scanner;

public class FirstWord {

   public static void main(String[] args) {

       //NOW YOU WANT TO COLLECT INPUTS FROM THE STUDENT OR USER

       //IMPORT THE SCANNER CLASS FIRST  outside your class

       // THEN YOU CREATE AN OBJECT OF THE SCANNER CLASS

       Scanner input = new Scanner(System.in);

       

       //CREATE A VARIABLE TO HOLD THE USER INPUT

       String text = input.nextLine();

       

       //The variable holder will be used to store characters from the for loop

       String holder="";

       

       //Create a for loop that loops through the user's input

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

           //As the loop increases, we get the character in the user's input and store them one by one in the variable holder

           holder+=text.charAt(i);

           if(text.charAt(i)==' '){

               //If the loop encounters a space, it means a complete word has been gotten from the user's input

               //Then the break below Breaks the loop, and the loop stops running

               break;

           }

       }

       System.out.println(holder);

}

Explanation:

text.length() returns the length of the sequence of characters present in length

text.charAt(a number) Returns the char value at the specified index. An index ranges from 0 to length() - 1. The first char value of the sequence is at index 0, the next at index 1, and so on, as for array indexing.

Create a for loop

How does a for loop work?

It collects a starting point, an end point and an increment respectively....all these are passed in as arguments into the for loop

For example, the code above starts from 0, calculates the number of characters in the user's input and sets it as the end point, the loop runs from zero to the length of the text of the user...

Note: i++ in the loop is the increment, it means the loop increases by 1

8 0
3 years ago
A network administrator identifies sensitive files being transferred from a workstation in the LAN to an unauthorized outside IP
Sav [38]

Answer:

D. Zero-day

Explanation:

It is clearly stated that the antivirus is still up-to-date on the workstation, and there has been no alterations to the firewall. Hence, this means the software is functional and up-to-date with all known viruses. This shows that this attack is unknown to the manufacturer of the antivirus software and hence no virus definition or patch fixing this problem has been developed yet. In this light, it is a zero-day.

A zero-day is a type of vulnerability in a software that is not yet known to the vendor or manufacturer, hence this security hole makes the software vulnerable to attackers or hacker before it is been fixed.

4 0
3 years ago
You want to equip yourself with FRUs for a laptop. What would you take with you? (Choose two)A. RAMB. SD card readerC. Video car
zloy xaker [14]

Answer:

RAM and Hard Drive

Explanation:

An FRU is also called a Field-repleacable Unit and is usually an assembly that is easily removed from an electronic equipment, laptop or just a computer and replaced so that one does not have to take the entire system for repairs. When trying to equip yourself with this unit of a laptop, you must take your Random Access Memory and your hard drive as they contain the whole information on the laptop.

4 0
3 years ago
Modify the WordCount program so it outputs the wordcount for each distinct word in each file. So the output of this DocWordCount
stepladder [879]

Answer and Explanation:

package PackageDemo;

import java.io.IOException;

import org.apache.hadoop.conf.Configuration;

import org.apache.hadoop.fs.Path;

import org.apache.hadoop.io.IntWritable;

import org.apache.hadoop.io.LongWritable;

import org.apache.hadoop.io.Text;

import org.apache.hadoop.mapreduce.Job;

import org.apache.hadoop.mapreduce.Mapper;

import org.apache.hadoop.mapreduce.Reducer;

import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;

import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

import org.apache.hadoop.util.GenericOptionsParser;

public class WordCount {

public static void main(String [] args) throws Exception

{

Configuration c=new Configuration();

String[] files=new GenericOptionsParser(c,args).getRemainingArgs();

Path input=new Path(files[0]);

Path output=new Path(files[1]);

Job j=new Job(c,"wordcount");

j.setJarByClass(WordCount.class);

j.setMapperClass(MapForWordCount.class);

j.setReducerClass(ReduceForWordCount.class);

j.setOutputKeyClass(Text.class);

j.setOutputValueClass(IntWritable.class);

FileInputFormat.addInputPath(j, input);

FileOutputFormat.setOutputPath(j, output);

System.exit(j.waitForCompletion(true)?0:1);

}

public static class MapForWordCount extends Mapper<LongWritable, Text, Text, IntWritable>{

public void map(LongWritable key, Text value, Context con) throws IOException, InterruptedException

{

String line = value.toString();

String[] words=line.split(",");

for(String word: words )

{

Text outputKey = new Text(word.toUpperCase().trim());

IntWritable outputValue = new IntWritable(1);

con.write(outputKey, outputValue);

}

}

}

public static class ReduceForWordCount extends Reducer<Text, IntWritable, Text, IntWritable>

{

public void reduce(Text word, Iterable<IntWritable> values, Context con) throws IOException, InterruptedException

{

int sum = 0;

for(IntWritable value : values)

{

sum += value.get();

}

con.write(word, new IntWritable(sum));

}

}

}

8 0
3 years ago
Which major and minor keys have no sharps or flats apex?
9966 [12]
C major and A minor have no sharps or flats.
5 0
3 years ago
Read 2 more answers
Other questions:
  • The git _____ command will display the last commit and what were the changes you made.
    9·1 answer
  • Which word in brackets is most opposite to the word in capitals? PROSCRIBE (allow, stifle, promote, verify)​
    14·2 answers
  • Dit View
    5·2 answers
  • Which magazine introduced the first microcomputer kit for the mits altair in its january 1975 issue?
    8·1 answer
  • How do you merge on excel?​
    5·1 answer
  • What settings are available in the Properties dialog box of a message? Check all that apply.
    6·2 answers
  • If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
    12·1 answer
  • the volume of two similar solids are 1080cm and 1715cm .if the curved surface area of the smaller cone is 840cm .fond the curved
    5·1 answer
  • How would I collect a number from the user to use for the radius of a circle?
    13·1 answer
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!