Exception in thread "main" java.lang.NullPointerException
at java.util.Arrays.mergeSort(Arrays.java:1157)
at java.util.Arrays.sort(Arrays.java:1092)
at begin.main(begin.java:44)
the error only comes after i sort them. Arrays.sort(array3);
but the same arrays runs fine up until the sorted one
help thanks
hi im having 1 prog,in this when i try to insert data from datatable to database,it showing me null pointer exception
plz give me some suggestion
thank u
tento program je nefunkcny a sposobuje trvale alebo docasne nasledky? ja som mal hru Minecraft a na nej my tento program chyba ja si ho potrebujem stiahnut ale este stale som nenasiel stranku na ktorej sa to da stiahnut tento subor a este vam chcem doporucit ze ak tento program umoznite stiahnut tak si aj zarobite lebo vela ludi tento program potrebuje, dakujem!
lic datamanish kumar gupta April 9, 2012 at 12:26 PM
javasonoo maurya May 29, 2011 at 4:21 PM
i want know, why we are use final for exception handling?
online purchasek.karthikeyan May 26, 2013 at 2:52 PM
none
online purchasek.karthikeyan May 26, 2013 at 2:54 PM
nullpointerexception
nullpointer downloadsaiviswanath February 4, 2013 at 9:24 PM
i want this game and i want this null pointer
Java - How to handle null pointer exception?sangeetha November 23, 2011 at 3:39 PM
How to handle null pointer exception?
java arrays null pointer erroryehuda December 25, 2011 at 10:23 PM
Exception in thread "main" java.lang.NullPointerException at java.util.Arrays.mergeSort(Arrays.java:1157) at java.util.Arrays.sort(Arrays.java:1092) at begin.main(begin.java:44) the error only comes after i sort them. Arrays.sort(array3); but the same arrays runs fine up until the sorted one help thanks
helpagnes January 19, 2013 at 7:01 PM
hi im having 1 prog,in this when i try to insert data from datatable to database,it showing me null pointer exception plz give me some suggestion thank u
java.lang.nullpointer.exceptionMarius Daniel March 6, 2012 at 2:45 PM
tento program je nefunkcny a sposobuje trvale alebo docasne nasledky? ja som mal hru Minecraft a na nej my tento program chyba ja si ho potrebujem stiahnut ale este stale som nenasiel stranku na ktorej sa to da stiahnut tento subor a este vam chcem doporucit ze ak tento program umoznite stiahnut tak si aj zarobite lebo vela ludi tento program potrebuje, dakujem!
lic datamanish kumar gupta April 9, 2012 at 12:26 PM
good
TELEPHONE(blackberry )MARIO COSTA April 11, 2012 at 2:18 AM
GOOD DAY, I'M NOT ABLE TO RECEIVE MESSAGE. I DON'T KNOW WHAT IS THIS:UNCAUGHT EXCEPTION JAVA.LANG.NULLPOINTEREXCEPTION.
java.lang.nullpointer exceptiondilrajkaur May 13, 2012 at 8:43 PM
i got this message on bbm and bbm stopped working, what can i do to make it work again
nullpointerexceptionGANESH K June 4, 2012 at 4:53 PM
thank you
String class madhu July 5, 2012 at 4:25 PM
how can i print the reverse of a string?I tried with reverse method but could not succeed. thanks for your help
null pointer exceptionRushi Chaudhari May 5, 2013 at 1:39 PM
Sir im getting the same null pointer exception plz help import java.io.*; import java.util.*; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Cell; import java.io.FileOutputStream; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; class bentupdate { static String [][] excelData; static int nop=0,advamt,balamt,amt; static String cus="",pl="",typ="",db="",dd=""; public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("Enter name of customer"); cus=sc.next(); System.out.println("Enter place"); pl=sc.next(); System.out.println("Enter type ofplant"); typ=sc.next(); System.out.println("Enter date of booking in dd/mm/yy"); db=sc.next(); System.out.println("Enter date of delivery in dd/mm/yy"); dd=sc.next(); System.out.println("Enter no. of plants"); nop=sc.nextInt(); System.out.println("Enter amt"); amt=sc.nextInt(); System.out.println("Enter advamce amt"); advamt=sc.nextInt(); System.out.println("Enter Balance amt"); balamt=sc.nextInt(); // -------------------------------------------------------------------------- try { FileInputStream file = new FileInputStream(new File("C:\\temp\\testPOIWrite.xls")); HSSFWorkbook workbook = new HSSFWorkbook(file); HSSFSheet sheet = workbook.getSheetAt(0); Cell cell=null; int x=1,y=0; for(x=1;x<200;x++) { cell=sheet.getRow(x).getCell(0); if(cell.getCellType() == Cell.CELL_TYPE_BLANK) { //Update the value of cell sheet.getRow(x).getCell(0).setCellValue(x); cell = sheet.getRow(x).getCell(0); cell.setCellValue(x); cell = sheet.getRow(x).getCell(1); cell.setCellValue(cus); cell = sheet.getRow(x).getCell(2); cell.setCellValue(pl); cell = sheet.getRow(x).getCell(3); cell.setCellValue(typ); cell = sheet.getRow(x).getCell(4); cell.setCellValue(db); cell = sheet.getRow(x).getCell(5); cell.setCellValue(nop); cell = sheet.getRow(x).getCell(6); cell.setCellValue(amt); cell = sheet.getRow(x).getCell(7); cell.setCellValue(advamt); cell = sheet.getRow(x).getCell(8); cell.setCellValue(balamt); cell = sheet.getRow(x).getCell(9); cell.setCellValue(dd); FileOutputStream outFile =new FileOutputStream(new File("C:\\temp\\testPOIWrite.xls")); workbook.write(outFile); outFile.close(); file.close(); System.exit(0); } } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } } }
Post your Comment