Search:

Type: Posts; User: robin_

Search: Search took 0.18 seconds.

  1. Replies
    0
    Views
    1,168

    2-dimensional array to file

    Hello, I've some problems writing out my stored data from my array to a text file.
    I've managed to get some kind of data in the file but I've problems understanding what it really is (is it...
  2. Re: Check if number is prime number or not problem[SOLVED]

    I see, sorry didn't mean to spoil any ideas :D
  3. Re: Check if number is prime number or not problem[SOLVED]

    Why n/2? Don't you mean the square root of n?
  4. Re: Check if number is prime number or not problem[SOLVED]

    Remember you also only have to check the odd divisors.
  5. Re: Check if number is prime number or not problemm

    Instead of counting the divisors, have you tried checking all possible divisors? I mean iterate from 2 to (n-1) if your number is n. A tip by the way, if your number is even and larger than 2, you...
  6. Replies
    4
    Views
    1,271

    Re: Question regarding superclasses & subclasses

    Oh now I see, thanks a lot! I might come back later with some more questions , but this was very helpful thank you!
  7. Replies
    4
    Views
    1,271

    Re: Question regarding superclasses & subclasses

    That gives me the impression of student2 being a Person as well as a Student, correct?

    However, I did create a method (getNumber) in the class Student that did return a number (just for testing),...
  8. Replies
    4
    Views
    1,271

    Question regarding superclasses & subclasses

    Hello

    I'm trying to understand some basics of classes that extends from other classes. I wonder if I could get some help.

    Assume I have the following class


    public class Person{
    private...
  9. Replies
    12
    Views
    1,315

    Re: Need help with empty arrays

    Oh, thats why... thanks Norm!
  10. Replies
    12
    Views
    1,315

    Re: Need help with empty arrays

    Yeah you are right, I'm sorry. However I'm still thankful for your help because you made me find the problem when you asked about the variable -elements. I never had the thought of matrix[i].length...
  11. Replies
    12
    Views
    1,315

    Re: Need help with empty arrays

    Sorry I mean matrix[i].length of course.
  12. Replies
    12
    Views
    1,315

    Re: Need help with empty arrays

    Well isn't that what I am doing? I'm looking if there is any integer in the matrix, if so. I count +1. And the elements matches the dimension of the matrix. That's why I compare elements with count,...
  13. Replies
    12
    Views
    1,315

    Re: Need help with empty arrays

    Aha yes sorry. It is 0! I thought it would be 3*1=3 (3 rows, 1 column). Why is that?

    Now I see it's obvious why it returns the value true, since counter==elements is true...
  14. Replies
    12
    Views
    1,315

    Re: Need help with empty arrays

    What array do you mean? This one below?

    int [][] matrixFalse2 = {{},{},{}};

    The values are nothing, right? I'm just trying to make the user of the program not able to "crash" my program with...
  15. Replies
    12
    Views
    1,315

    Need help with empty arrays

    Hello

    I'm currently working on a method that is supposed to row reduce a given array. However, before I've started the coding on the row reduction. I'm trying to create a method that can control...
Results 1 to 15 of 15