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
Paraphin [41]
3 years ago
13

6. Choose the TWO conditions that could be used for an IF-statement, without a compile-time error. Assume variable str is a Stri

ng type variable. Assume double-quotes indicate String values.

Computers and Technology
1 answer:
KengaRu [80]3 years ago
3 0

Answer:

  1. 4 ==5
  2. "six"== 6

Explanation:

You might be interested in
Write a program that reads a file containing text. Read each line and send it to the output file, preceded by line numbers. If t
Shtirlitz [24]

Answer:

I am writing a JAVA program:

import java.io.FileReader;  // class used for reading data from a file

import java.io.IOException;  //class used for handling exceptions

import java.io.PrintWriter;  // class used to printing or writing formatted data. It is used when the data to be written contains text and numbers

import java.util.Scanner;   // class used to take input from the user

public class Main  {  //start of the class

public static void main(String[] args)  {//start of main() function body

Scanner input = new Scanner(System.in);  //creates Scanner class object

System.out.print("Enter the input file name: ");  // prompts user to enter the input file name

String input_file = input.next();  //to  read and return the token i.e. input file name and store this into input_file String type variable

System.out.print("Enter the output file name: "); // prompts user to enter the output file name

String output_file = input.next();   /to  read and return the token i.e. output file name and store this into output_file String type variable

try   {/* try  defines a chunk of code to be tested for errors during the execute of this chunk. its a code block for reading from input file and writing to output file. This handles the exception if program cannot create or write to the file indicated. */

   FileReader inFile = new FileReader(input_file);  //creates object inFile of FileReader class to read the input_file contents

   Scanner scan = new Scanner(inFile);  //read and scans the input file

   PrintWriter outFile = new PrintWriter(output_file);  //creates object outFile of PrintWriter class to write to the output file. It is used to write output data in a readable text form.

   int count = 1;    //counts the line number      

   while (scan.hasNextLine())  {  //loop keeps checking for the next line in input file

    String lines = scan.nextLine();  // reads the entire line of the input file and stores that line contents in String lines

    outFile.println("/* " + count + " */ " + lines);  //each line represented with line number enclosed in /* */

    count++;  }   //increments the line number at each iteration    

    outFile.close();        }  //closes the output file after writing the contents from input file with each line of the input file enclosed in  /* */

catch (IOException e)  {  // catching the IOException and prints the following message if program cannot create input_file or write to the output_file

   System.out.println("Error processing file: " + e);    }     }   }

Explanation:

The program is well explained in the comments mentioned with each statement of the above program. The user is prompted to enter input and output file names. Then the program uses a while loop that scans through lines of the input file and count variable counts each line of input file. Then at each iteration the count variable counts a line of input file and line number of each line of the input file is enclosed in /* */ delimiters. The contents of input file, in which the line numbers of text lines of the input file are enclosed in /* */ delimiters, is written to the output file.

The screenshot of the program is attached along with the output file produces as a result of this program execution.

7 0
3 years ago
You are connected to a server on the Internet and you click a link on the server and receive a time-out message. What layer coul
Grace [21]

Answer: Application layer

Explanation: Application layer is the level in the OSI model which carries out the function of the abstraction in the network.The abstraction works by maintaining the interface between application and network.

It helps in the transferring of the information and data as well using the protocols. So,if any time out message alert is received  by clicking on the link then the server condition is usually busy and thus cannot respond. In this case application layer is responsible for the problem.

7 0
3 years ago
Used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a se
Sati [7]

Answer: A- Public Key Encryption

Explanation: The Public key Encryption is used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a secret key. It uses an asymmetric encryption scheme in which the encryption key is made public, but the decryption key is kept private.

7 0
4 years ago
Read 2 more answers
Which is the best example of online multimedia?
grigory [225]
<span>Online multimedia is digital media, which includes photos, video and music, distributed over the Internet. Users access the online multimedia via </span><span>personal computers and smartphones. The most commonly used online multimedia are websites.
</span>
<span>Websites contain text, audio, images, animations, video and interactive content.</span>
8 0
3 years ago
Read 2 more answers
Answer for 5,6,7 any one know plz
katrin2010 [14]

Answer:

first question option is d

second is false

third is mark

Explanation:

5-The following are generic font

  • serif
  • sans-serif
  • cursive
  • fantasy
  • monospace

6 - We can change image size using height and width. so it is false.

7 - we can highlight text using <mark> Marked text </mark>

5 0
3 years ago
Other questions:
  • Identify the parts used in an electric circuit- Tiles
    9·2 answers
  • Are mechanical keyboards more expensive than membrane keyboards?
    9·2 answers
  • Which of these components is a part of the central processing unit (CPU) of a computer? A. memory B. storage C. control unit D.
    8·2 answers
  • مسألة لبرنامج الماتلاب لمصفوفة وعمود
    10·1 answer
  • What are the biggest problems facing the criminal justice system in the area of computer crime
    10·2 answers
  • A global project called One Laptop per Child is attempting to distribute low-cost laptop computers to children in developing cou
    10·1 answer
  • Que quiere decir analogico
    6·1 answer
  • What did Aristotle teach?
    6·2 answers
  • Implement the above in c++, you will write a test program named create_and_test_hash.cc . Your programs should run from the term
    9·1 answer
  • 2y/3 - y-1/6 + 7y-1/4 = 2 1/6​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!