0

can anyone help me with this?
. Given the Java String variable assignment
String sentence = "This is a sample sentence";
what will the following sequence of Java statements print? Explain why Java will print this result.
String x = sentence.substring(4, 10);
System.out.println(x);

thanks a lot!!!

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by griswolf
0

You need to

  1. Keep It Organized - Do post Java questions in the Java forum
  2. Keep It Organized - Do provide evidence of having done some work yourself if posting questions from schoolwork assignments
  3. Understand: We only give homework help to those who show effort
  4. Keep It Organized: Do make sure to use the link at the bottom to mark it solved if it is solved and you are the original poster

Edited by griswolf: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.