Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners problem regarding autoboxing
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sandeep
problem regarding autoboxing
2 Answer(s)      5 years and 9 months ago
Posted in : Java Beginners



Advertisement
View Answers

January 14, 2009 at 6:30 AM


Hi friend,

The range of integers number between -128 and + 127 (inclusive) is 256
this is the same number of values which an unsigned 8 bit integer can contain (from 0 to 255).

Thanks


January 14, 2009 at 6:36 AM


HI friend,


Implement following code according to requirement :


import java.io.*;

public class TestDemo {

public static void main(String args[]) throws IOException {
System.out.println("Example of value comparing");
BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter first integer value! ");
int in = Integer.parseInt(buff.readLine());

System.out.println("Enter second integer value! ");
int in1 = Integer.parseInt(buff.readLine());

if(in == in1)
System.out.println("value are same!");
else
System.out.println("value are not same!");

}
}

------------------------------------

Visit for more information:

http://www.roseindia.net/java/

Thanks.

Amardeep


Related Tutorials/Questions & Answers:
problem regarding autoboxing - Java Beginners
problem regarding autoboxing    hello all , i have a problem regarding autoboxing Integer i = 127; Integer j = 127; if(i ==j) System.out.println("value are same"); else
problem regarding tomcat server 6.0
problem regarding tomcat server 6.0  Jul 27, 2012 10:39:19 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performanc e in production environments
Advertisements
Autoboxing unboxing in Java - Java Tutorials
.style1 { text-align: center; } Autoboxing and Unboxing The Autoboxing and Unboxing  was released with the Java 5. Autoboxing During...) is known as Autoboxing. During assignment or calling of constructor
Autoboxing in Java
Autoboxing in Java is the automatic transformation of primitive data types... primitive data types. Autoboxing or automatic transformation of primitive data... of Autoboxing in Java: public class MainClass { public static void main(String args
AutoBoxing,==,!=,equals() - Java Interview Questions
AutoBoxing,==,!=,equals()  Hi, I am really confused of ==,!=,equals() operations on Autoboxing the new feature in java 5.0 . Can any one tell me... on == It's simple: When we do Integer i = 127; autoboxing turns
Autoboxing/unboxing of primitive types
Autoboxing/unboxing of primitive types When adding a primitive data type...;(); The autoboxing and auto-unboxing of Java primitives produces code that is more concise... is another sample program featuring autoboxing and unboxing. It is a static
Regarding repository
Regarding repository  How to check in and check out using SVN repository using eclipse
regarding rev
regarding rev  write a prog. in java that display all the arguments passed at the command line in reverse order
Regarding Project
Regarding Project  sir, i am doing a project in java. my project is CITY GUIDE it is an web application. please give me documentation of my project
Regarding Project
Regarding Project  sir, i am doing a project in java. my project is CITY GUIDE it is an web application. please give me documentation of my project
Regarding Hibernate
Regarding Hibernate  Both JDBC and Hibernate are used to connect to database then whats the need of going to hibernate? What are the main differences? And could you let me know please
Regarding javascript
Regarding javascript  Hi, I want 4 upload buttons in HTML CODE and Among 4 browse buttons user is not selected any one then provide a prompt message like plz select any 1 file among 4 buttons.If user is selected either 1st
regarding jtable...
regarding jtable...  sir, im working with jtables. i wanted to populate a jtable from the database and when i click any row it should add a container below that row itself and show the required details of the row
Regarding Datasource
Regarding Datasource  Hi friend, Good morning,how r u,i want to share 1 information to u,I got a job in VERIZON DATA SERVICES INDIA PVT.LTD,u help a lot when i am in academic project,with that project only i got a job
regarding project
regarding project  OBJECTIVES OF THIS PROJECT: -Ability to test the programmer for basic interaction skills to understand the client requirement. -Ability of the programmer to ask the right questions and get the relevant
regarding project
regarding project  OBJECTIVES OF THIS PROJECT: -Ability to test the programmer for basic interaction skills to understand the client requirement. -Ability of the programmer to ask the right questions and get
regarding project
regarding project   sir we need help about project. we have idea about his project please guide me sir. OBJECTIVES OF THIS PROJECT: -Ability to test the programmer for basic interaction skills to understand the client
regarding java - JDBC
regarding java  i am making a project on supply chain system i have... in mysql supplier table producer table customer table problem is that how i... will be directly saved in the database i have seen many examples regarding
regarding web.xml - JSP-Servlet
regarding web.xml  I am the java beginner, please send the web.xml code and how to run a servlet for apache5.0.... my problem is in tomcat manager am getting the message 'fail' in web.xml  Hello,Please check the tomcat
regarding J2ME - Java3D
regarding J2ME  I have a problem. I have to write a 200line text in J2ME,for that i am using drawString(),but de problem... use textarea control ,in j2me has various controls textfield,combobox..etc so   hi use
query regarding arraylist
query regarding arraylist  i m using sql server + jsp to develop my program. i have a problem of fetching data from the table in database. i m storing my keys in arraylist, now i want to get data according to that keys. keys
regarding images in jsp
regarding images in jsp  Hi, When I am trying to display an image in jsp, i am getting the image of bar charts in webroots/jspchart/web... me out in fixing the solution for my problem? Thanks in advance
regarding interview in java
regarding interview in java  why java doesnot suppor muliple inheritance   Java does not support multiple inheritance directly..., JVM get some abigious problem and will get confused as which method
Regarding JSP code
Regarding JSP code   hello sir tell me the way to navigate different type of user like manager and client from same login page to different interfaces in JSP code I am using Oracle 10g database .Exactly problem with me is that i
Regarding tiles and struts - Struts
Regarding tiles and struts  Hi, i have a struts application which uses tiles my problem is when i am redirecting/forwarding from a jsp page(which is a tiles page) i am not able to redirect properly it was showing response 
regarding JSP - JSP-Servlet
regarding JSP  Hi, This is Malleswari from Satyam. I'm facing a problem while running the JSP tags...like if i want to write or any other, the tag is not supported in my page. In prefix i mentioned "c". still i didnt get
regarding socket - Development process
regarding socket  sir I have a project of socket. which takes input from user(client) and checks in database(server) and sends the responses to client but I am facing problem this connection maintains for only single thread
Query regarding JSP, JDBC
Query regarding JSP, JDBC  can I get the code for the question asked by me regarding JSP,JDBC
Regarding path settings in java
Regarding path settings in java  Hello I had a problem... the solution for the problem whether there is any fault in settings or compiling(javac Hello.java).Recently i posted the same problem and some other guy gave me
regarding jdbc - JDBC
regarding jdbc  how i can configure java with ms access
 

 

 

DMCA.com