Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- System.out.println("Podaj zdanie: ");
- String sentence = scan.nextLine();
- if (sentence == null) {
- System.out.println("Wpisz zdanie jeszcze raz.");
- String newSentence = scan.nextLine();
- System.out.println(newSentence);
- } else {
- System.out.println(sentence);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement