Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.println("Wprowadź zdanie: ");
- String text = input.nextLine();
- StringBuilder reverse = new StringBuilder(text);
- reverse.reverse();
- System.out.println("Zdanie po zamianie: " + reverse);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment