× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
1
New Topic  
Stromile Stromile
wrote...
Posts: 299
Rep: 0 0
6 years ago
What are the syntax errors from the following program?
public class Enigma
{
   public static void main(String[] args)
   {
      System.out.println("Input a String");
      String x = scan.nextString();
      int size = x.length;
      char last = x.charAt(size);
      System.out.println("The last character in your string
                              ", x, " is ", last);
   }
}
Read 56 times
1 Reply
Replies
Answer verified by a subject expert
se7ense7en
wrote...
Posts: 327
Rep: 0 0
6 years ago
Sign in or Sign up in seconds to unlock everything for free
This verified answer contains over 150 words.
1

Related Topics

Stromile Author
wrote...

6 years ago
You make an excellent tutor!
wrote...

Yesterday
This calls for a celebration Person Raising Both Hands in Celebration
wrote...

2 hours ago
Just got PERFECT on my quiz
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  887 People Browsing
Related Images
  
 335
  
 1322
  
 862
Your Opinion
Which industry do you think artificial intelligence (AI) will impact the most?
Votes: 405

Previous poll results: Who's your favorite biologist?