For you to do:
-
Create a String named "name" and assign the value "Timmy" to it
-
Print out the length of the string variable 'name'
class Main {
public static void main(String[] args) {
String name="Timmy";
System.out.println(name.length());
}
}
반응형
'Java_beginner(Repl.it) > Auto-Graded-Course(AP CS A)' 카테고리의 다른 글
008 - String Methods - indexOf (0) | 2019.11.26 |
---|---|
007 - String Methods - charAt (0) | 2019.11.26 |
005 - Creating Variables and Printing 5 (0) | 2019.11.26 |
004 - Creating Variables and Printing 4 (0) | 2019.11.26 |
003 - Creating Variables and Printing 3 (0) | 2019.11.26 |