Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Java Echo Example

This is a simple Java program that reads input from the user and echoes it back.

How It Works

  • The program uses a Scanner to read user input.
  • It then prints that input back with the prefix "Echo:".

How to Run

You can run this code using any Java compiler. Here's a quick way using an online compiler:

Run it Online

💻 Sample Code

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      System.out.print("Enter text: ");
      String input = scanner.nextLine();
      System.out.println("Echo: " + input);
  }
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages