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
igomit [66]
2 years ago
7

JAVA

Computers and Technology
1 answer:
butalik [34]2 years ago
5 0

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner input = new Scanner(System.in);

       System.out.print("Input a word: ");

       String userinput = input.nextLine();

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

           System.out.print(userinput.charAt(i));

       }

   }

}

Explanation:

This line prompts user for input

       System.out.print("Input a word: ");

This declares a string variable named userinput and also gets input from the user

       String userinput = input.nextLine();

The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2

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

This prints characters at i-th position

           System.out.print(userinput.charAt(i));

You might be interested in
are the network administrator for your company. You are installing a new printer in the network. When you check the print server
melamori03 [73]

Answer:

Will have to run the net start spooler command.

Explanation:

  • The printer spooler seems to be accountable for overseeing incoming faxes that have been in effect intended for handling by the printer. Whether this device stops operating, your printer won't publish documentation as well as the machine may not notice it either.
  • To solve these problems, you'll need to run the net start spooler command using the least administrative effort.
5 0
2 years ago
Create a Trip class. Include as data members destination, distance traveled, total cost of gasoline, and number of gallons consu
Luba_88 [7]

The answer & explanation for this question is given in the attachment below.

Download docx
4 0
3 years ago
1. Create a constructor definition that has two parameters, a manufacturer’s brand and a screen size. These parameters will brin
katen-ka-za [31]

Answer:

C++.

Explanation:

#include <iostream>

#include <string>

using namespace std;

////////////////////////////////////////////////////////////

class Television {

   string brand;

   float screen_size;

   bool powerOn;

   int volume;

   int channel;

   

public:

   // Comments

   Television(string brand, int screen_size) {

       this->brand = brand;

       this->screen_size = screen_size;

       powerOn = false;

       volume = 20;

       channel = 2;

   }

   //////////////////////////////////////////

   // Comments

   int getVolume() {

       return volume;

   }

   

   // Comments

   int getChannel() {

       return channel;

   }

   

   // Comments

   string getManufacturer() {

       return brand;

   }

   

   // Comments

   float getScreenSize() {

       screen_size;

   }

   ///////////////////////////////////////////

   // Comments

   void setChannel(int channel) {

       this->channel = channel;

   }

   

   // Comments

   void power() {

       if (!powerOn)

           powerOn = !powerOn;

   }

   

   // Comments

   void increaseVolume() {

       volume = volume + 1;

   }

   

   // Comments

   void decreseVolume() {

       volume = volume - 1;

   }

};

3 0
3 years ago
When you go to your school's computer support office, it will help if you have written down any _________ messages.
Finger [1]

Answer:

error

Explanation:

3 0
2 years ago
Explain cell reference and its types with examples?​
skad [1K]

Answer:

There are two types of cell references: relative and absolute. Relative and absolute references behave differently when copied and filled to other cells. Relative references change when a formula is copied to another cell. Absolute references, on the other hand, remain constant, no matter where they are copied.

8 0
2 years ago
Other questions:
  • The most popular input device of a computer is a(n) ____.
    6·1 answer
  • What is the function of series-parallel circuit
    9·1 answer
  • There are about what licensed drivers here in Florida
    7·1 answer
  • 1) Put the following in order from smallest to largest A) 1,500,000 bytes B) 2,000 kilobytes C) 0.01 petabytes D) 1 Terabyte E)
    8·1 answer
  • The 3 parts of the CPU are
    15·2 answers
  • What are two different ways by which a laptop could utilize the cellular network connection of a mobile device
    15·1 answer
  • To meet the requirement for the number of vdss on board, what must be true about pyrotechnic vdss?
    15·1 answer
  • Terence creates software requirements specification (SRS) documents for various software development projects. In which phase of
    6·1 answer
  • Put simply, what tasks do algorithms help computers perform?
    13·1 answer
  • What is the value of six sigma ? How dose it relate to agile management
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!