Advertisement
blackpab

Lab1_z3

Feb 21st, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.68 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package deklaracjawlasna44;
  7. import java.util.Scanner;
  8.  
  9. /**
  10.  *
  11.  * @author student
  12.  */
  13.  
  14. public class Deklaracjawlasna44 {
  15.  
  16.     /**
  17.      * @param args the command line arguments
  18.      */
  19.     public static void main(String[] args) {
  20.         // TODO code application logic here
  21.         String FirstName, SurName;
  22.         byte[] declaration = {
  23.             74 , 97, 32, 110, 105, 122, 101, 106, 32, 112, 111, 100, 112, 105, 115, 97, 110, 121, 32, 100, 101, 107, 108, 97, 114,
  24.             117, 106, 101, 44, 32, 122, 101, 32, 97, 108, 98, 111, 32, 110, 97, 117, 99, 122, 101, 32, 115, 105, 101, 32, 74, 65,
  25.             86, 89, 32, 100, 111, 32, 107, 111, 110, 99, 97, 32, 115, 101, 109, 101, 115, 116, 114, 117, 32, 97, 108, 98, 111, 32,
  26.             110, 105, 101, 32, 110, 97, 122, 121, 119, 97, 106, 99, 105, 101, 32, 109, 110, 105, 101, 32, 115, 116, 117, 100, 101,
  27.             110, 116, 101, 109, 32, 33, 33, 33
  28.         };
  29.        
  30.         Scanner ScanIn = new Scanner(System.in);
  31.         System.out.print("Podaj swoje imie: ");
  32.         FirstName = ScanIn.nextLine();
  33.         System.out.print("Podaj swoje nazwisko: ");
  34.         SurName = ScanIn.nextLine();
  35.         ScanIn.close();
  36.         System.out.println("\n\n-----------------------------------------------------------------------------");
  37.        
  38.         for (int i=0; i<declaration.length; i++)
  39.             System.out.print((char)declaration[i]);
  40.        
  41.         System.out.println("\n\n" + FirstName + " " + SurName);
  42.     }    
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement