|
||
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
im working on a program and in the constructor i need to initialize a StringBuilder object with equal numbers of a the letters Y & N the constructor has an int argument which will specify how many of each String the StringBuilder will be initialized with. The code I have so far is: Java Code
public Questions(int aNumber)
{
super();
this.anwers = new StringBuilder(5);
}
hoe someone can help
|
|
|||
|
Hello guys
im working on a program and in the constructor i need to initialize an array with equal numbers of the Strings "Y" & "N". the constructor has an int argument which will specify how many of each String the array will be initialized with. The code I have so far is: Java Code
String answers[];
public Questions(int aNumber)
{
super();
anwers = new String[6];
}
is this even possible or am I going about this the wrong way? I hope someone can advise me in some way as im completely stuck! Any help is much appreciated. Last edited by davie; 25-02-2010 at 05:18 PM. |
| The Following User Says Thank You to helloworld922 For This Useful Post: | ||
davie (11-03-2010) | ||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To: Add line numbers to your JTextArea | Freaky Chris | Java Code Snippets and Tutorials | 5 | 01-04-2010 10:08 AM |
| help me .. about creating random numbers | soldier | Java Theory & Questions | 2 | 21-12-2009 12:24 AM |
| Roman Numbers | chronoz13 | What's Wrong With My Code? | 14 | 12-12-2009 06:19 AM |
| How to reverse a String using java.lang.StringBuilder | JavaPF | Java Code Snippets and Tutorials | 0 | 22-07-2009 02:42 PM |
| Random numbers | Pooja Deshpande | Java SE APIs | 8 | 05-06-2009 09:36 AM |
|
100 most searched terms
Search Cloud
|
| 2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jbutton java jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? |