Jump to content

Emp75

Members
  • Posts

    314
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Well, that would be your problem. Try replacing the line: private static String[] elements; With this : private static String[] elements = {"Honesty","Kindness","Laughter","Generosity","Loyalty","Magic"}; //Remember to initialize this array to something before trying to access it. Princess Luna is the best Pony. Honestly do not use this code in the final version of this program, from wyvren2000 The array is 103 inputs and they are supposed to be read from a file that I have. The file is an excel chart with every element in the periodic table that looks like this: | Name | Atomic Number | Atomic Weight | Symbol | 1| | | | | 2| | | | | 3| | | | | 4| | | | | etc. all the way down to 103. I have another question (yeah, I'm pretty bad at this) I am trying to set up a method that is used like this: mol.displayAtomicMakeUp(); I have initialized mol in the main and I'm trying to get the displayAtomicMakeUp() method to read in what mol actually is. It might sound a bit strange, but I'm not sure how to word it. If it was displayAtomicMakeUp(mol) it would make more sense to me, as I know how to actually take what mol (a string) is from that but what do I do for mol.displayAtomicMakeUp()?
  2. Just using that class, I'll see if I can get the isDigit method working.
  3. We haven't learned what the isDigit method is, could you perhaps go into more detail as to how to use it? Well all I'm trying to do is create the Periodic Table data type which is just an array of all of the elements in the periodic table. The elements are stored on excel with the name, atomic number, atomic weight, symbol. In the constructor I'm just trying to read in the file and enter the data into the array and the display method to just print out the information in the array. The first 6 in the array would look like this. Hydrogen,1,H,1.01 Helium,2,He,4 Lithium,3,Li,6.94 Beryllium,4,Be,9.01 Boron,5,B,10.81 Carbon,6,C,12.01
  4. I'm working on a program assignment for my Introduction to Java class and I need help a few things. Is there anyway to split a String by characters and numbers? For example, the assignment has to do with molecular formulas and for Prozac the formula is C17.H19.F3.N10 I have split the formula by each of their atoms and how many of them using Stringtokenizer but I want to split each token (C17 H19 F3 N10) by their atoms and how many of them, so right now I have the string "C17" and I want to split that so I have atom = C and number = 17 For this example each atom is only one letter but others might have an atom with more than one letter so I can't just use substring. I also have to create a PeriodicTable data type and I'm getting the NullPointerException and I am unsure as to why. Here's my code: import java.util.*; import java.io.*; public class PeriodicTable { private static String[] elements; public PeriodicTable() throws IOException { elements = new String[103]; Scanner filein = new Scanner(new File("elements.csv")); int k=0; while(filein.hasNextLine()) { elements[k] = filein.nextLine(); k++; } } public static void display(String[] ar) { for(String item: ar) { System.out.println(item); } } public static void main(String[] args) { display(elements); } } Any advice would be appreciated.
  5. I finished building my first computer last night and when I tested it I plugged it into an old monitor with a VGA cable. The graphics card came with a DVI/VGA adapter since the card only has 2 DVI ports and an HDMI port. The monitor displayed a boot up screen last night but it didn't have an OS yet at the time. Today I've been having problem getting any signal to my monitor with the DVI port. The graphics card fan spins inside my case, I'm not sure if that means the graphics card should be working or not. I've installed the latest drivers before anyone suggests that. I have a Gigabyte Z68A-D3H-B3 mobo and a EVGA GTX 570.
  6. That's one bank spot you'll never, ever see again. At least he'll never say a scammer emptied his bank :ohnoes: You never know, a hacker might want to empty all of them and sell the vials for an extra 2m :P
  7. oh no... you didn't really do serums/pray pots till 70, wait... 75, oh my god... Not 84. You didn't do that. that is so crazy, oh and you're going to have one less space in your bank with all those... they don't stack so you can drop them. :ohnoes: yeah.. i have a stack of 42,910 serum 207's now OMFG you made almost 43 thousand potions for 84 herb...I woulda killed my self. :wall: :wall: :wall: :wall: I've just bought supplies for 90,000 Serum 207's. Goodbye life. Goodbye 60m. My 67-92 Herb.
  8. Yes it is definitely worth using them. Making them is the same as any other pottery except they require 2 soft clay per urn. You then need to add an air rune to the infernal urns to activate them. Each urn holds 25 infernal ashes.
  9. Emp75

    Brawlers

    Is it true that you can no longer use Brawling gloves outside wilderness? I know they worked after the FT update, but i was recently told that Jagex changed it so you couldn't use them outside the wilderness. If so, GF Pray brawlers + Gilded Altar.
  10. Only allowed me to do 100 songs with the free version... any other programs out there?
  11. I'm looking for a FREE (VERY IMPORTANT) program that can transfer music from your Ipod onto your computer. I used a program on my other computer and it worked fine but I can't seem to remember the name. Any help would be appreciated.
  12. Anyone know if this will get boosted xp rates on BXP?
  13. I have a few questions about Mithril Dragons. - What is the approximate drop rate of DFH's? - What is an ideal inventory set-up? - Is it even worth bothering with these if I can fight TD's?
  14. Well this week has been my luckiest week in terms of drops on RS. My first EVER GWD drop (not including shards because they're worthless anyways) My first EVER Dragon Claws drop after ~1,000 kills First GWD drop to myself :D Nice abby demon task that I figure I'd post, no whips though.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.