Recent content by coorrel

  1. C

    C++ string comparison with = operator?

    I'm not too familiar with comparing strings in C++ and I'm learning it as I learn Java at school. I did do an example and it seems to be comparing the contents of the string. #include <iostream> using namespace std; int main(int argc, char *argv[]){ for (int i = 0; i < argc; i++){...
  2. C

    Unable to compile (JAVA)

    Didn't bother reading it carefully but other than the Scanner stuff already mentioned, I did notice this one line where you're trying to do something like this: for (int i = 0; i < 10; i++) { System.out.println (i); if (i == 10) System.out.println...
  3. C

    Finding Missing SQL Table Links

    I'm not very good at sql but if it's missing can you just use 'is null' or something similar? I think it's something like: select * from table1, table2 where table1.col1 = table2.col2 and table2.col2 is null
  4. C

    Basic JOptionPane.showInputDialog question...

    Well a.equals("") caught it... Yeah through a little reading I corrected my misconception of believing null string == "" (blank) string ... Thanks guys
  5. C

    new mother board and processor and now hard drives not booting

    The change of hardware on motherboard and CPU requires a user to do a complete a reinstall of OS or repair install. Window doesn't load because it will look for the hardware serials numbers of the pre-activated state, so new hardware = new serial = window can't find valid hardware = broken EULA...
  6. C

    Basic JOptionPane.showInputDialog question...

    String a = JOptionPane.showInputDialog("Enter something"); if ( a == null) do this else if ( a.equals("\u2422")) do this else do this At the prompt screen if the user don't input anything and just press "ok"... What data is in String a? It's not null, it's not the blank unicode...
  7. C

    java formatting method for c++ setw()

    I have a StringBuffer class that that returns its toString, containing multiple lines of text, I would like to have around 5 spaces infront of the block of the returned toString()... I've searched the web for a while now and came to the conclusion it can't be done without importing other...
  8. C

    java enums

    I have a few thing on enums I would like to ask... How do you access the strings? N("North") I've read the enum API a few times valueOf() or values() doesn't give me the string so I've read a few tuts and added a few methods in the enum class but it didn't help much. How do I pass a string to...
  9. C

    calling methods in static void main()

    Thanks Chicon after reading your post about different classes and usage of members in different methods it got me thinking that I need to create a new object inorder to use other methods in other methods: Test t = new Test(); Then just call other methods normally from what ever static or...
  10. C

    calling methods in static void main()

    In a java program I would like to keep my switch statements clean by calling a method for each case instead of having a very long switch statement. Here's an example: public class Test { public static void main(String args[]) { Scanner s = new Scanner(System.in); boolean a = false; do {...
  11. C

    color laser jet

    Reinstall drivers perhaps...
  12. C

    DDR2 or GDDR3 ?

    My choice: 256Mb GDDR3 running at 1.3Ghz clock speed GDDR3 can reach higher effective memory clock speeds, where it's not possible for DDR2. About the amount of memory on theses can is arguable on its performance, I would say the core/memory clocks effect the performance much more than...
  13. C

    scanner nextint() question

    From this I see that next() grabs everything until whitespace/return in the keyboard buffer, but the stuff in buffer stays there that's why getLine() displays the same thing, which grabs uptill the carriage return in the keyboard buffer. That's why the s.nextLine() is needed in between to skip...
  14. C

    JAVA inheritance constructor question

    Yup, yup... Thanks Chicon Found that out while doing some testing today it works. Now a I've got a new problem. class C has it's own method that is not inherited from the class A or class B. abstract class A public class A(String a, int b) { method(a); anotherMethod(b); }...
  15. C

    JAVA inheritance constructor question

    I'm not sure what to do in the constructor of Class C. abstract class A public class A(String a, int b) { method(a); anotherMethod(b); } //A's abstract method public abstract String aMethod(); abstract class B extends A public class B(String a, int b, int c) { super(a...
Top