Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

Students also viewed these Databases questions