0

In java class Bytes I have:

public final static Comparator<byte []> BYTES_COMPARATOR = new ByteArrayComparator();

From ruby, how can I access the above field ? I tried

Bytes:BYTES_COMPARATOR
Bytes.BYTES_COMPARATOR

Neither of the above worked.

Hint is appreciated

2
  • For colon, I got "NameError: uninitialized constant". For dot, I got NoMethodError Commented Dec 25, 2017 at 5:10
  • Did you try a double colon? Commented Dec 25, 2017 at 5:15

1 Answer 1

2

Try this instead:

Bytes::BYTES_COMPARATOR

Assuming you imported Bytes

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.