ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
   
 
Categories  >>  Code Snippets  >>  Programming Code  >>  Java Code  >>  J2SE Code
 
 


 

 
 J2SE Code interview questions  J2SE Code Interview Questions
 J2EE Code interview questions  J2EE Code Interview Questions
 J2ME Code interview questions  J2ME Code Interview Questions
Question
Write a program to convert a decimal number to binary form?
 Question Submitted By :: Kk_komarraju
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Write a program to convert a decimal number to binary form?
Answer
# 1
String s="";
while(n > 0 ) {

if(n % 2 == 0)
s+="0";
else
s+="1";

n=n/2;

}
s.reverse();
 
Is This Answer Correct ?    7 Yes 3 No
Hamada Zahera
 

 
 
 
Other J2SE Code Interview Questions
 
  Question Asked @ Answers
 
write a program that will ask the user to enter a number n and display the product of all numbers from 1 to n.  1
write a program that inputs two real numbers then exchanges their values. Infosys7
Write a java program to display multiplication table in a Frame.  1
How to create and run runnable jar file of a Java Project. HCL4
How Can I Trace A Java Program . Please Give Me Step by Step Process IBM1
how to store and retrive a set of values without using an array Maximus8
inner join,outerjoin,trigger,stored procedure explain with code snippets? IBM1
how to create a (*)pyramid using java codes??? Infosys5
is public static void main() work in java?is "String arg[]" needed as argument? Tech-Mahindra3
How can we get the details for printing the employee details at run time using JDBC connectivity? can u provide the coding for that? Its urgent?  2
Write a program to convert a decimal number to binary form? Oracle1
we compile any program bu c:/>javac prog.java and run as c:/>java prog Here what's the meaning of c in javac. We have java Interpreter but not compiler.Then why we have to use javac. Please answer this question?  2
 
For more J2SE Code Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com