Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Object Oriented question.
Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Object Oriented question.

  1. #1
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Object Oriented question.

    I have been programming in C and Perl for a long time now, but haven't touched any Object Oriented languages yet. Now I started learning Java 2 programming. I've read a lot of tutorials but I'm still not grasping the concept of Object Oriented programming.
    Can somebody tell me what a method is? Looking at the code it looks like a function in C or Perl. In that case why is it called a method and not a function? What is the difference? None of the tutorials explained this.

  2. #2
    Guest

    Re: Object Oriented question.

    mathod == function

    We call it that when we put it into an object..

  3. #3
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: Object Oriented question.

    Ok, so when you say "Call the main method of the HelloWorld class" it would mean "Call the main function in the HelloWorld module?".

  4. #4
    Guest

    Re: Object Oriented question.

    Yeah, kind of. Methods are just like functions, but they are part of a class

  5. #5

    Re: Object Oriented question.

    What is the difference? None of the tutorials explained this.
    You should get some better tutorials, sounds like the ones you're reading suck

  6. #6
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: Object Oriented question.



    You should get some better tutorials, sounds like the ones you're reading suck
    Yes, I've come to that conclusion. They start talking about this and that method of a class right away before defining what the hell a method is.

  7. #7
    Guest

    Re: Object Oriented question.




    Yes, I've come to that conclusion. They start talking about this and that method of a class right away before defining what the hell a method is.
    Let's see if we can find some for you... Well, I could send you some, but they are in Danish

  8. #8
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: Object Oriented question.

    Actually, I'm reading one right now here: http://www.ibiblio.org/javafaq/javatutorial.html

    It looks pretty decent.

  9. #9
    Guest

    Re: Object Oriented question.


  10. #10
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: Object Oriented question.

    All right I'm getting ahead in Java. I came across a problem that I haven't found a solution to yet. In the following code I'm returning the value of "a". But how can I return the value of both "a" and "b"?
    Code:
    public class test {
      
      public float test() {
        float a = 1.1;
        int b = 1;
        
        return a;
    }

Similar Threads

  1. object file not supporting kernel version
    By misbah_khan in forum Linux - General Topics
    Replies: 1
    Last Post: 11-27-2006, 07:02 AM
  2. Testing through Shared Object File of Code
    By honey bee in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 07-27-2006, 12:19 PM
  3. libXmu.so: cannot open shared object file: Too many levels of symbolic links
    By shupi in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 07-04-2006, 05:18 AM
  4. libXmu.so: cannot open shared object file
    By shupi in forum Linux - General Topics
    Replies: 0
    Last Post: 07-02-2006, 09:49 AM
  5. Possible to get different object files from the same source code & toolchain?
    By josaiah in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 10-17-2002, 02:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •