aspose file tools
The moose likes Beginning Java and the fly likes displaying empty boolean method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "displaying empty boolean method" Watch "displaying empty boolean method" New topic
Author

displaying empty boolean method

kay jayz
Greenhorn

Joined: Feb 20, 2011
Posts: 2
hello everybody,
hmmm and the question is... (scary drums or the jaws theme music)
a JNI class defines a method from a dll (JNI part is from an experienced coder) that brings boolean state. it's called e.g. sth()
how can i display the boolean state to the console or just figure it out if it's true or false. the method has no parameters.
i have tried to make an object in my class e.g. pp.sth() but then system.out.println(...) well what now?


thank you in advance
kay

ps. i learn java but i guess i'm just not that far
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Welcome to the Ranch!

Have you tried the simple ? The body doesn't matter at all in this case, only the return value. That's going to be true or false, and that's what you're going to print out.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
kay jayz
Greenhorn

Joined: Feb 20, 2011
Posts: 2
yes i did but eclipse wants to change the pp.sth() object in main to static
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: displaying empty boolean method
 
Similar Threads
Threads (wait & notify)
getClass on array
date
boolean "is" method
Overriding methods of interface possible ?