Search results

  1. Loppan

    computer science area

    I was tired when I was doing that one :embarass: Here is another problem. I want to find a number. I have declared it as a String. I have for ex. this number 1887-87897. I don't know how to find it. I have done this method but it's probably wrong. public Bok findNumber(String n) {...
  2. Loppan

    computer science area

    I used the skip.Line() wrong in the main class. Here's another problem: C:\Program\Xinox Software\JCreator LE\MyProjects\cd5450\Lab5\BokProjekt\Projektuppgift\Bokhylla.java:114: cannot resolve symbol symbol : method taBortBok (Bok) location: class Bokregister r.remove(b1)...
  3. Loppan

    computer science area

    public String returnWriter() { return writer; }
  4. Loppan

    computer science area

    It's me again with a problem :D Here's a bit of code. The problem that I have is that it doesn't print out the books of a certain writer. public void findWriter(String w) { Collator co = Collator.getInstance(); co.setStrength(Collator.PRIMARY); System.out.println("Books that" + w +...
  5. Loppan

    computer science area

    Since there's a little debatte on my problem; I have three classes, person, age and then the main class. I don't even know if this is right Arrray class: Person [] arr; statix final int max = 100; int numberofperssons=0; // Constructor public Array () { arr=new Person[max]...
  6. Loppan

    computer science area

    Thanks! Just one more question. What if you don't know the numbers . Should it be like this then: int[] arr = arr[i]
  7. Loppan

    computer science area

    I have a problem with arrays. Let's say I have arrays: 23,25,28,29,24,27 How do I find the oldest person in the array. I have done something like this: public int oldest() { int old=arr[0]; // I know this line is wrong for(int i=0;i<objects;i++) { if (arr[i]<old)...
  8. Loppan

    computer science area

    It could be any number. The user are to decied that.
  9. Loppan

    computer science area

    I need some help. I got a problem in programming which is that I've got two numbers that's gonna change with each other. Ex. Value 1= 1 Value 2= 2 are to be Value 1= 2 Value 2= 1 I think i'm going to use a loop but I'm not sure