Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Signature  RSS feed

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what should be the method signature in java for calling a method the following method in c .

write_data(void * buf,int buf_size)

shashank
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java does not have a void type that is used in code. There is a void type in the library, but I have not seen it used, just use empty braces() in the function call. You can use void as the return type, but my reading of the the Void.java file today suggests that it is just a placeholder for the use in writing the java machine. Though the constant keyword binds to the left in c/c++ and should be coded int const * const someint; and people would not let you do that, they won't even let you use the const keyword in java .... you code:   final int someint;//   in java.

Everything else is so close that I do not rember anything about my transition to Java from c/c++, except that it took two weeks to get used to that and you code a pointer as [] ... not *

That didn't take more than three or four seconds to acclimatize to.

Welcome to the Saloon
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To answer your question, you cannot do that in Java.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!