|
-
October 29th, 2009, 10:55 AM
#1
Java help!
Hi i need help in debuging this error.. How can i pass the variable abbrName into this method? then append fullname into abbreviations[count-1].addFullName(fullname); then call back to constructor? or theres a better way of doing it?
public int getAbbreviationCount(String strLine,int count){
if(abbreviations[count-1].getAbbrName().trim().equals(abbrName.trim()))
{
abbreviations[count-1].addFullName(fullname);
return count-1;
}
return count
}
Code:
public class Abbreviation{
private String abbrName, a;
private String[] fullNames, b;
public Abbreviation(String abbrName, String fullName ){
this.abbrName=abbrName;
String[] fullNames= { fullName };
this.fullNames=fullNames;
}
Last edited by hugo84; October 29th, 2009 at 12:51 PM.
-
October 29th, 2009, 11:49 AM
#2
Re: Java help!
 Originally Posted by hugo84
Hi i need help in debuging this error..
What error? If you get an error, post the full error message text and stacktrace, if present.
How can i pass the variable abbrName into this method? then append fullname into abbreviations[count-1].addFullName(fullname); then call back to constructor? or theres a better way of doing it?
Perhaps if you described what your code is supposed to do, and explained what you were trying to achieve, it would make more sense...
It is better to have an approximate answer to the right question than an exact answer to the wrong one...
J. Tukey
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|