34 lines
869 B
Java
34 lines
869 B
Java
/*
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|
*/
|
|
package lab10_calebfontenot;
|
|
|
|
import java.util.Scanner;
|
|
|
|
/**
|
|
*
|
|
* @author caleb
|
|
*/
|
|
public class ReadWriteCapsOrSmallLetters {
|
|
public static void main(String[] args)
|
|
{
|
|
// Declare variables
|
|
String line;
|
|
|
|
// Setup scanner
|
|
Scanner input = new Scanner(System.in);
|
|
|
|
// Prompt for input
|
|
System.out.println("Please enter 5 words on one line seperated by whitespace: ");
|
|
line = input.nextLine();
|
|
|
|
System.out.println("The line you entered: "+ line);
|
|
|
|
System.out.println("The line you entered in all caps: " + line.toUpperCase());
|
|
|
|
|
|
|
|
}
|
|
}
|