bankaccount program Programming Software Development by Jishnu …, I am trying out a bank account program using the corejava package. I am getting a run-time eception when I…. Plz help. I am giving the code below. [CODE] import corejava.Console; /**************************************************************** **cLASS bANKaCCOUNT REPRESENTING THE RUN-TIME MULTI-USER SYSTEM… bankaccount program Programming Software Development by Jishnu …, I am trying out a bank account program using the corejava package. I am getting a run-time eception when I… is. Plz help. I am giving the code below. import corejava.Console;/******************************************************************cLASS bANKaCCOUNT REPRESENTING THE RUN-TIME MULTI-USER SYSTEM… Re: bankaccount program Programming Software Development by Jishnu …..the thing in bold is the suggested correction. [CODE] import corejava.Console; /**************************************************************** **cLASS bANKaCCOUNT REPRESENTING THE RUN-TIME MULTI-USER SYSTEM… Help making table Programming Software Development by jls7168 … really appreciated. Here is my code so far...[CODE]import corejava.*; public class Ascii { public static void main(String[] args) { System… Student Quiz Programming Software Development by yasaswyg …); } }[/CODE] Class 3 [CODE]package Lab6; import java.io.*; import corejava.*; public class Util { public static Student [] readFile(String filename, Student… Help with PopupMenu Programming Software Development by Tellalca Hey; I am following CoreJava and came to Event Handling chapter. I am trying to … Re: Linked List program - stumped w/ 1 problem Programming Software Development by quuba … == Operator[/QUOTE] [URL="http://java.sun.com/mailers/techtips/corejava/2006/tt0822.html"]http://java.sun.com/mailers/techtips…/corejava/2006/tt0822.html[/URL] [QUOTE] The == operator works on String … Re: need an answer please Programming Software Development by veecarthic … Driven Progarammings with JDBC Only.RMI Also Part of the CoreJava. J2SE - Java Standard Edition technologies all of in Java applicable… Re: Cannot Resolve Symbol Programming Software Development by masijade Make sure you are using corejava.Format and not java.text.Format. Re: I am so confused! Programming Software Development by knowledgelover … was in my earlier weeks [url]http://www.freejavaguide.com/corejava.htm[/url] also the Deitel and Deitel resource are worthy… Re: Starting "Java" [Java tutorials / resources / faq] Programming Software Development by NetByte …;] Java @ About.com [/URL] [URL="http://www.freejavaguide.com/corejava.htm"] Free Java Guide [/URL] [URL="http://javabat… Re: Thinking In Java? Programming Software Development by balajimarisetti Cay Hortsman's CoreJava(Eight Edition) and Concepts of Java are also very good books. I like the way he dealt with the concepts. Re: Help me choose my specialization? Community Center by rajarajan2017 … you have the lot of good things to do there, CoreJava - you can develop your programming (Analytical,Logical)skills Advanced Java… Re: Sound processing reference Programming Computer Science by ciint You can make it,you may require any assistance go through this website. [url]http://www.freejavaguide.com/corejava.htm[/url] Re: Loop print Help! Programming Software Development by Taywin … intimidating, you may try [URL="http://www.freejavaguide.com/corejava.htm"]this one[/URL] instead. Still, you need to… Re: bankaccount program Programming Software Development by Jishnu The exception is encountered after I enter a name. Exception in thread "main" java.lang.NullPointerException Re: bankaccount program Programming Software Development by masijade Your trying to access/use something that has not been defined/initialised yet. The full error message, and highlighting of the line referenced in the error message would help. Re: bankaccount program Programming Software Development by Ezzaral I would imagine you are getting the exception because you are trying to access an Account object in your array but you have not actually created any Account objects. The line [code]database=new Account[MAXACC];[/code] creates an array of Account references, but those are still null until you assign an element an object like so [code]database[0] = … Re: bankaccount program Programming Software Development by masijade First of all, What thing in bold? Second of all, why did you start a new thread? Rather than sticking with [url]http://www.daniweb.com/forums/thread81344.html[/url] ? Re: bankaccount program Programming Software Development by Ezzaral Actually, the part in bold was not necessarily what I had in mind - but it does fix the error. You really don't need to create Account objects until they are requested, as in createNew(). You would need to take care to make null checks before performing any operations on an array reference of course. It would actually be easier if you used an … Re: bankaccount program Programming Software Development by Jishnu Actually, even after this modification, the error persists ! HELP ! Re: bankaccount program Programming Software Development by Ezzaral Ok, I missed one other thing on my first glance on the code. Your initialization block is not getting called because it is not static and you are using the class in a static manner. Add the 'static' keyword before your initialization block and it will work fine:[code] // initialisation block static { acc_logged_in=-1; … Re: bankaccount program Programming Software Development by Jishnu Yup, that worked ! Thanks ! [:)] Re: Help making table Programming Software Development by stephen84s You will need to use a nested for loop if you want to print fixed number of characters horizontally also. Following is how you loop would look like (note it is just for an illustration, you may have to modify it further to get what you exactly want) :- [code=java] final int noOfCharsPerLine = 10; for (int i = 128; i < 256; i++){ for… Re: Help making table Programming Software Development by jls7168 Yes, thank you! Re: Student Quiz Programming Software Development by jwenting good, it should give that error. You've just proven that your compiler works. It can't find the class because the class isn't in the same package and you failed to import it. You stupidly didn't put the class in a package so it's of course quite impossible to import it, but that's something you can easily rectify. Re: Student Quiz Programming Software Development by yasaswyg [QUOTE=jwenting;1235033]good, it should give that error. You've just proven that your compiler works. It can't find the class because the class isn't in the same package and you failed to import it. You stupidly didn't put the class in a package so it's of course quite impossible to import it, but that's something you can easily rectify.[/QUOTE]… Re: Student Quiz Programming Software Development by NP-complete Are you having all the classes in the same folder? Re: Student Quiz Programming Software Development by yasaswyg [QUOTE=NP-complete;1235047]Are you having all the classes in the same folder?[/QUOTE] Yes I have all these classes in the same folder. I put the "Data.txt" in the same folder too but it doesnt recognize it Re: Student Quiz Programming Software Development by Nicris Ur Util class is in package "Lab6" .... but Student and ReadSource are not in that same package........... May be that could be the problem .......