Advertisement
VIISeptem

Untitled

Feb 12th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1.  
  2. public class Reverse{
  3.  public void reverse(String input){
  4.     String ausgabe = "";
  5.     for(int i = 0; i < input.length(); i = i + 1){
  6.     char zeichen = input.charAt(i);
  7.    
  8.     ausgabe = zeichen + ausgabe;
  9.    
  10.     }  
  11.     System.out.println(ausgabe);
  12. }
  13.  public void zweitenBuchstaben(String input){
  14.     String ausgabe = "";
  15.     for(int i = 0; i < input.length(); i = i + 2){
  16.     char zeichen = input.charAt(i);
  17.    
  18.     ausgabe =  ausgabe + zeichen ;
  19.    
  20.     }  
  21.     System.out.println(ausgabe);
  22. }
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement