Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.tiy.practice;
- import java.util.Arrays;
- import java.util.Scanner;
- public class AnotherClass {
- public static void main(String[] args) {
- AnotherClass myClass = new AnotherClass();
- myClass.firstLetterCapitol();
- }
- public void firstLetterCapitol() {
- Scanner userInput = new Scanner(System.in);
- System.out.println("please enter a string");
- String userString = userInput.nextLine();
- char[] characters = userString.toCharArray(); // characters is the array I created taken from userInput
- int charIndex = userString.length(); // charIndex tells me length int of array
- for (int index = 0; index < charIndex; index++) {
- // figure out what to do in this array
- }
- }
- //System.out.println(userString.replace(" ", ""));
- // System.out.println(userString.split(" "));
- // create an interface for Variable, Method, and Class
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement