PDA

View Full Version : Java Pointers and Missing method body


Pattielli
Jul1-04, 11:54 AM
I declare my pointer as char* ptr and my function as public boolean FuncFoo() but java compiler complains that I have some problem with identifier right at * and my function is missing the method body...
I couldn't figure out what was wrong with them. Would you please help me ?
Thank you,

faust9
Jul1-04, 02:40 PM
Firts part: Java doesn't have pointers.

Second part

public boolean FuncFoo()
{
you need a body even if you leave it bank
}


Java doesn't require function definitions either (is that why you're not using the {}?). Simply create your function and call it.

http://leepoint.net/notes-java/10background/10applications_and_applets/05intro/60JavaVsC.html