CG Technical Area > Programming
Java Help
(1/1)
UnknownError:
The Problem: Write code that will look at the number of characters in String m= "Look here!"; and then print
"Look Here!" has 10 characters.
Use the length method() to print the 10.... you must also force the two quotes to print.
What I have so far.
--- Code: ---String m = “Look here!â€;
int x = m.length();
System.out.print(“\"Look here!â€\†)
System.out.print(
--- End code ---
TowerSheep:
I won't give you the answer yet incase you want to figure it out. Message me on steam if you do want the answer. I will provide to helpful links
Things to look into:
The Java documentation on what can be done to strings:
http://docs.oracle.com/javase/6/docs/api/java/lang/String.html
The methods of escape characters and what they do:
http://web.cerritos.edu/jwilson/SitePages/java_language_resources/Java_Escape_Sequences.htm
Navigation
[0] Message Index
Go to full version