If you want to learn how to write, publish and market your own book or ebook through online channels, this Kit will walk you through the entire process, from a blank page to a finished money-maker... Get it now!
Put those fields into a class and make an array of objects.
Perhaps you should also be advised to look into the use of java.util. List and ArrayList and Maps? They are much easier to use and may be more performant, depending on your needs.
Private class Transaction { public String name; public int balance; public int number; public Foo etc; } private Transaction transactions = new TransactiontransactionCount; Now you can say, e.g. : int thatGuysBalance = transactionsthatGuysIndex. Balance; Or: Transaction t = new Transaction(); t. Balance = 1000000; t.
Number = 3; t. Name = "That Guy"; transactionsthatGuysIndex = t.
1 Why oh why to you make an example using Objects with public fields. That's bad practice. – JB Nizet Aug 28 at 7:06 Because I'm not writing a book.
Feel free to edit the answer if you don't like it. – jeffamaphone Aug 28 at 7:15 @JB Nizet In such a small example, do you not agree getters/setters cloud understanding? Surely best practice should come after a basic understanding of objects :)?
– obfuscation Sep 1 at 14:45.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.