• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help regarding SCJP 5

 
Deepaks Deshpande
Ranch Hand
Posts: 114
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I am new to this forum.I am preparing for the SCJP 5 exam..I am taking the exam on 24th of this month.Can anybody help me with the exercise9-2 in threads chapter.How do you increment a letter in a stringbuffer.And also suggest some mock exams.I will be completing my first reading by tomorrow and then revise.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

For help with question 2 from chapter 9 of K&B, search this forum for "XXYY" and you will find plenty of discussions on this question.

For mock exams, see our SCJP FAQ: What are some mock exams available?

(Sorry, I don't know what you mean about incrementing a letter in a StringBuffer.)
 
Deepaks Deshpande
Ranch Hand
Posts: 114
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have found out how a string buffer can be incremented...will this work??
StringBuffer sb = new StringBuffer("A");
for(int i=0;i<10;i++)
{
System.out.println(sb);
}
char a = sb.charAt(0);
++a;
sb.setCharAt(0,a);
for(int i=0;i<10;i++)
{
System.out.println(sb);
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic