Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. package com.tiy.practice;
  2.  
  3. import java.util.Arrays;
  4. import java.util.Scanner;
  5.  
  6. public class AnotherClass {
  7. public static void main(String[] args) {
  8. AnotherClass myClass = new AnotherClass();
  9. myClass.firstLetterCapitol();
  10. }
  11.  
  12.  
  13. public void firstLetterCapitol() {
  14. Scanner userInput = new Scanner(System.in);
  15. System.out.println("please enter a string");
  16. String userString = userInput.nextLine();
  17. char[] characters = userString.toCharArray(); // characters is the array I created taken from userInput
  18. int charIndex = userString.length(); // charIndex tells me length int of array
  19.  
  20. for (int index = 0; index < charIndex; index++) {
  21. // figure out what to do in this array
  22. }
  23. }
  24.  
  25.  
  26. //System.out.println(userString.replace(" ", ""));
  27. // System.out.println(userString.split(" "));
  28.  
  29. // create an interface for Variable, Method, and Class
  30.  
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement