• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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);
}
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic