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



Home Answers Viewqa Java-Beginners problem regarding autoboxing

Have Programming Question? Ask it here!
 
 
 


sandeep
problem regarding autoboxing
2 Answer(s)      5 years and 8 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 rev
regarding rev  write a prog. in java that display all the arguments passed at the command line in reverse order
Regarding repository
Regarding repository  How to check in and check out using SVN repository using eclipse
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 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 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 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 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 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  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   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
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 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 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 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
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 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
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
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
regarding email - JavaMail
regarding email  hi i used the code which is in this web site to send...; Hi friend, The main problem of "Can not connect to SMTP host: localhost... of Session.getDefaultInstance can cause this problem. Is your SMTP server on your local machine
regarding jdbc - JDBC
regarding jdbc  how to connect mysql with java example you have provided is having some error and i am not able to remove that error please... code and details having the error to solve the Problem. Thanks  
Regarding project - Applet
Regarding project  hi friend , iam doing project in Visual cryptography in Java so i need the Help regarding how to make a share of a original imahe into shares anu
Regarding weblogic portal
Regarding weblogic portal  Hi, My name is Ramanuja.i am working on weblogic portal.if u know any info regarding plz provide the materials or information to me.plz help me. Thanks in advance
regarding JTable - JDBC
regarding JTable  how to populate a JTable with mysql data after clicking JButton please explain with the example
regarding tags - Struts
regarding tags  What is the difference between html:submit and nested:submit and usage of tags based on the situation
regarding struts 2
regarding struts 2   is it not possible to get values from applicationresources.properties into our application in struts 2
Regarding GUI Applications
Regarding GUI Applications  How to create a save and open jmenu item in java desktop application
Regarding core java
Regarding core java  how do we find reverse of string with out using String functions
regarding j2me - Java Beginners
regarding j2me  sir but i have to use the drawString u tell me how can i display two too long strings
regarding mini project - JDBC
regarding mini project  i need to make a mini project using servlet and jdbc.pls help me with a real time application
regarding login.jsp code - Java Beginners
regarding login.jsp code  i tried to implement the login.jsp code example given in roseindia.net. but it is saying invalid loginbean. after... have any more problem then give in details to solve the problem. Thanks
regarding webservice - WebSevices
regarding webservice  hi, I want to implement Webservices, How i have to use? pls reply me.   Hi Mention your requirement properly.Exactly what you wanna do
Regarding Scroll Bar - CVS
Regarding Scroll Bar  HI all, i have a Text Message box which i have incorporated in my code which goes something like
regarding jdbc - JDBC
regarding jdbc  is there any way in jdbc to retieve data from a table and show it by using swing concept i mean to say data from the table can be shown in swing interface with tabular form
Regarding Documentation of Packages
Regarding Documentation of Packages  Hello How to get java packages ie documentation of classes ,Interfaces and methods from windows command prompt.In the sense Java.lang,java.awt,java.math etc
Query regarding hashmap
Query regarding hashmap  I want to store some names and ids in hashmap in session, then retrieve it on next page and iterate through ids to run a query using ids one at a time
Regarding junit testcases
Regarding junit testcases  Can Any one help me ..How to write junit testcase for Email (plz dont give links ...i want code
doubt regarding JSF
doubt regarding JSF  Hi, pls explain what is difference between struts &JSF? pls explain what is difference between SPRING &JSF
 

 

 

DMCA.com