karan chandok wrote:parseAllFiles(f.getPath());
for(File f : filesInDirectory)
Got null point exception in these two lines
Any suggestion please
Rob Spoor wrote:And what does lastIndexOf return if there is not dot in the String? And what will that specific return value do with the calls to substring?
Rob Spoor wrote:I quote one case:
fred rosenberger wrote:What if it were "JPG"?
More precisely, what will x be in that case, and what will be the results?
Andreas Svenkson wrote:Hi guys, I was rehearsing some stuff regarding initialization and was wondering about this code..
If line 3 is commented out, and line 4 is uncommented, we will get the expected "illegal forward reference" compiler error. My question is, why exactly does line 3 not cause this error?
For those interested, there is more information here: http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#287406
I have my suspicions but still find it slightly unreasonable; because while 'j' is used on the left hand side of an assignment, it is arguably also on the right hand side.
// Andreas
Ashish Maharaja Singh wrote:please tell me the error in my concepts. I am get this error on line "TempArray ta = new TempArray(le,ri);"
James Sabre wrote:
Prasanna Kumaar wrote:
Actually My CSV files format is
1231231,some string
i.e first 7 characters are numbers then separator then some text.
the junk characters occurs before the number part it seems. can you help me out?
Please re-read my response. I have explained what the 3 junk characters are and how to deal with them. To re-iterate; to understand the problem follow the link to the BOM Wikipedia site. You can either manually remove the junk characters or you can employ my much plagiarised class BOMStripperInputStream obtained by following the other link I gave.
James Sabre wrote:
Prasanna Kumaar wrote:
fred rosenberger wrote:What makes a character a 'junk' one?
while reading some of the .CSV files the following double quoted characters were present in the begining of first line ""
...all other lines were normal
The characters are the BOM for utf-8. Java is very bad at dealing with BOMs and the BOM can be removed and you should then open the file using utf-8 character encoding. My class BOMStripperInputStream plagiarised on several sites can help to remove the BOM.
fred rosenberger wrote:What makes a character a 'junk' one?
Ulf Dittmer wrote:Check the AccessingFileFormats page for links to several CSV processing libraries.
Gene Hilpert wrote:Sorry I have not been watching this forum.
1) first create a copy of the orginal parent record with a new Primary key.
2) change the FK on the child record to the primary key of the new parent record you just added.
3) delete the old parent record because you dont need it any more.
4) ask your DBA why he or she would ever use as a primary key data that might need to be changed. (well ... maybe you should not ask this question)