Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

method undefinedjava

Name: Anonymous 2013-10-06 12:24

hello /prog/ i have the following java code http://pastebin.com/WT7PPk1z

and on line 15 eclips gives the error "The method pMedio(Point) is undefined for the type Point"

How can i fix this?

Name: Anonymous 2013-10-06 12:30

You need to understand the difference between instance and class methods.

You're trying to call the method pMedio on the Point class. The Point class has no 'pMedio' method, that's something you've defined, but you've defined it as a method on the Client class, not the point class.

Name: Anonymous 2013-10-06 12:32

Rewrite it in Ruby and use method_missing.

Name: Anonymous 2013-10-06 12:36

>>3
>and run 20 times slower

Name: Anonymous 2013-10-06 12:38

HUEHUEUHEHUEHUEUHEUHEUHEUHEUHEUHEUHEUHEHUEHUEHUEHUEHUEHUE

Name: Anonymous 2013-10-06 12:42

actually i defined 'pMedio' in class SegRecta but i think i got what you mean. How can i make the error disappear without moving 'pMedio' to class Point?

Name: Anonymous 2013-10-06 12:45

>>6 was to >>2

Name: Anonymous 2013-10-06 12:46

>>6

SegRecta isn't Point. You really need to learn what static and class methods are because it's a core principle of Java.

I don't know what you're trying to do so I can't say what the solution is here, but I think you might need

public Point pMedio (Point p1, Point p2)

then call pMedio(A, B) instead of A.pMedio(B)

Name: Anonymous 2013-10-06 12:47

What kind of self respecting BR doesn't write everything in Lua?

Name: Anonymous 2013-10-06 13:20

niggers

Name: Anonymous 2013-12-22 9:54

YOU HAVE BEEN VISITED BY LE GREEN SAD NEGRO FROGE OF SADDNESS
REPOST THIS IN 100`000 threads or be a frog!

`
           ████████     ██████       
         █░░░░░░░░██ ██░░░░░░█      
        █░░░░░░░░░░░█░░░░░░░░░█     
       █░░░░░░░███░░░█░░░░░░░░░█    
       █░░░░███░░░███░█░░░████░█    
      █░░░██░░░░░░░░███░██░░░░██    
     █░░░░░░░░░░░░░░░░░█░░░░░░░░███ 
    █░░░░░░░░░░░░░██████░░░░░████░░█
    █░░░░░░░░░█████░░░████░░██░░██░░█
   ██░░░░░░░███░░░░░░░░░░█░░░░░░░░███
  █░░░░░░░░░░░░░░█████████░░░█████████
 █░░░░░░░░░░█████ ████   ████ █████   █
 █░░░░░░░░░░█     █ ███  █    ███ █   █
█░░░░░░░░░░░░█   ████ ████   ██ ██████
░░░░░░░░░░░░░█████████░░░████████░░░█
░░░░░░░░░░░░░░░░█░░░░░█░░░░░░░░░░░░█
░░░░░░░░░░░░░░░░░░░░██░░░░█░░░░░░██ 
░░░░░░░░░░░░░░░░░░██░░░░░░░███████  
░░░░░░░░░░░░░░░░██░░░░░░░░░░█░░░░░█ 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
░░░░░░░░░░░█████████░░░░░░░░░░░░░░██
░░░░░░░░░░█▒▒▒▒▒▒▒▒███████████████▒▒█
░░░░░░░░░█▒▒███████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█
░░░░░░░░░█▒▒▒▒▒▒▒▒▒█████████████████
░░░░░░░░░░████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█
░░░░░░░░░░░░░░░░░░██████████████████
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█    
██░░░░░░░░░░░░░░░░░░░░░░░░░░░██     
▓██░░░░░░░░░░░░░░░░░░░░░░░░██       
▓▓▓███░░░░░░░░░░░░░░░░░░░░█         
▓▓▓▓▓▓███░░░░░░░░░░░░░░░██          
▓▓▓▓▓▓▓▓▓███████████████▓▓█         
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██       
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█       
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█

Don't change these.
Name: Email:
Entire Thread Thread List