Question: this program was created using java in the jgrasp interface. Write a 6 sentence summary of what the program is doing, and correct any errors

this program was created using java in the jgrasp interface.

Write a 6 sentence summary of what the program is doing, and correct any errors if any?

import java.io.*; //directory to all java.io classes on the classpath

import java.util.*; //allows us to access all the classes and methods

public class Doublespace{ //class name

static void doubleSpace(Scanner s, PrintStream ps) // creating a double space method. Scanner is s and Printstream is ps

{ // opening of double space method while(s.hasNextLine()){ // Creates a boolean ps.println(s.nextLine()); //this returnes the strings of the current line ps.println(); // prints blank line } // end of while method } //end of double space method public static void main(String[] args) { //creates a main method Scanner in = new Scanner(System.in); //creates a new scanner with the specified string object doubleSpace(in,System.out); // prints doubleSpace } //end of main method } // end of the class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!