• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

how to convert to binary or hexadecimal

Hi,

I am trying below program.

public class test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	
	public static void exByte(){
		
		byte b =-128;
		b=127;
	}

}

Open in new window


when i highlight 127 in the netbeans IDE , I see  a buld on left hand side and when i mouse hover i see option to convert to hexadecimal or binary etc. But in eclipse i do not see that. Is there is a way to do it eclipse as well. please advise. thanks in advance
byteConvertToBinary.jpg
0
gudii9
Asked:
gudii9
3 Solutions
 
ozoCommented:
127 = 0x7f = 0b1111111
0
 
gudii9Author Commented:
i wonder in eclipse any shoort cut feature similar to netbeans exists? please advies
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
i wonder in eclipse any shoort cut feature similar to netbeans exists?
Not that I have ever come across. You could write your own plugin to implement that feature, or pay someone to develop it for you!
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
zzynxSoftware engineerCommented:
I use the Windows Calculator (set in Programmer mode) for that.
It has Decimal, Hex, Oct and Binary mode to switch between.
0
 
gudii9Author Commented:
Not that I have ever come across. You could write your own plugin to implement that feature,

how to do it. Please advise
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Writing an Eclipse plugin is well beyond this forum. If you are interested there are plenty of tutorial available on the Internet, but be warned it is a pretty advanced project to do that and you will need to learn a lot of concepts about how Eclipse works.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now