• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

help regarding SCJP 5

 
Ranch Hand
Posts: 114
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);
}
 
Forget Steve. Look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic