0

Hi, I have to write a simple Java code real quick and was wondering how to write the following macro in Java:

#define BUF 256
4
Contributors
3
Replies
6
Views
8 Years
Discussion Span
Last Post by alwinnjavaroor
0

You probably would do something like:

public final static int buf = 256;

It's not exactly the same thing but performing about as good as it gets. It's comparable to a const.

0

hi 'rernst' recently a friend of mine asked me to convert a c++ coded pgm to java codes
and there was macro [ #define f(x) x*x*x ] how do get java equivalent code for this?
using a function call is undesirable for this pgm ....can u help on this

Edited by alwinnjavaroor: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.