Home Tutorialhelp Comment Error in thsi core

 
 

Comment

gangadhar bommasani
Error in thsi core,
June 27, 2007 at 1:21 PM

stack.push(n) in this we should pass the object but here we are using primitive..then i am trying to use got compile time error

str = br.readLine();
n=Integer.parseInt(str);
stack.push(n);

this is not correct..........


str = br.readLine();
n=Integer.parseInt(str);
Integer n1=new Integer(n);
stack.push(n1);
this is correct


View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java-Tutorials

Java Util Examples List
examples that demonstrate the syntax and example code of java util package... Java Util Examples List - Util Tutorials       The util package or java provides many 

Java-Tutorials

Lang and Util Base Libraries
Lang and Util Base Libraries The Base libraries provides us the fundamental features and functionality of the Java platform. Lang and Util Packages Lang and Util package provides the fundamental classes and Object of primitive type 

Java Beginners

util packages in java
util packages in java  write a java program to display present date and after 25days what will be the date?   import java.util.*; import java.text.*; class FindDate{ public static void main(String[] args 

Java Beginners

core java - Java Beginners
core java  When we will use marker interface in our application?  Hi friend, Marker Interface : In java language programming... an error. To make more clearly understand the concept of marker interface you 

Java Beginners

Core java linked list example
Core java linked list example  What is the real time example for linked list 

Java Beginners

core java
core java  Hello sir,What is logic behinde the core java programms,How may programmas are there,for example,sorting of two numbers,grade of the student details,fibonice serice,paldroma,incremting of the program,asscedding 

Java Beginners

core java
core java  Hello sir,What is logic behinde the core java programms,How may programmas are there,for example,sorting of two numbers,grade of the student details,fibonice serice,paldroma,incremting of the program,asscedding 

Java Beginners

Core Java
Core Java  Hi, can any one please expain me below topics: 1.How to handle memory leakage from your developed code. 2.How to handle stack overflow error from your developed code. Thnaks 

Java-Tutorials

Java util package Examples
 

Java Interview Questions

Core Java
Core Java  Is Java supports Multiple Inheritance? Then How ?   There is typo the question is , What is Marker Interface and where it can... Interface. Here is an example: interface markerImp { } class MarkerTest 

Java Beginners

Core Java
Core Java  can any one please tell me the difference between Static and dynamic loading in java???   The static class loading is done... this with one example 

Java Beginners

core java
core java  public class Sample{ public static void main(String args[]){ int a; } } Q.why the above code is not compiled ? Q.why the below... as there is no error in code, you have created a class Sample and in main method, you have 

Java Beginners

core java
core java  java program using transient variable   Hi... be saved when the object is archived. Here is an example: public class..., visit the following link: http://www.roseindia.net/help/java/t/transient-java 

Java Beginners

core java
core java  what does the term web container means exactly?please also give some examples   Hi, In Java Platform, Enterprise Edition..., which is used to deploy and execute the servelet and JSP. Example of web 

Java Beginners

core java
core java  hello sir....i have one table in which i have 3 columns First Name,Middle Name,Last Name...............but i have to show single name in datagrid view in jsp page using concat string tokenizer......for example- First 

Java Beginners

core java
core java   class A { int a=3; int b=4; public A(int a,int b) { this.a=a; this.b=b; } void display() { System.out.println(a); System.out.println(b... the parrentheses .............example is--------suppose display is looking like 

Java Beginners

Core Java
Core Java  Hi, I have written a board program using Java Swing... class Example extends JFrame implements MouseMotionListener{ JPanel panel... Example(); } public Example() { super("Example"); panel = new JPanel(new 

Java Beginners

core java
core java   class Arrayd { static int max(int x[]){ int i,max; max=x[0]; for(i=0;i<x.length;i... with this error!  You have written main method outside the class. Put 

Java Beginners

Core Java
Core Java  Hi, can one please share the code to count the occurance of each charaters in a given String?? For example: String is "aabbcad" o/p will be:- a3b2c1d1 or a=3, b=2,c=1,d=1   public static void main(String 

Java Beginners

Core Java
Core Java  Hi, can any one please share the code to check the String s1="abcd"; String s2="bacd"; is permutaion of each other??   Here is an example that prompts the user to enter two strings in order to check 

Java Beginners

Core Java
Core Java  Hi, can any one please share the code to find the occurance of characters in a string?? ex:- aaabb o/p: a=3 b=2   Here is an example that count accepts the string from the user and count the occurrence 

Java Beginners

Core Java
Core Java  Hi, I am trying to remove duplicated charater from a given string without using built in function, but getting some issue in that. can...;Here is an example that removes the duplicate character from the string. import 

Java Beginners

Core Java
Core Java  Hi, Can any one please share the code to check the permutaion of the String??   Here is an example that prompts the user to enter two strings in order to check whether they are permutation of each other 

Java Interview Questions

Core Java
Core Java  Q. A producer thread is continuously producing integers...() { while(true) { th.get(); } } } class Example { public static void main...); } } For more information, visit the following link: http://www.roseindia.net/java 

Java-Tutorials

Java Util Package - Utility Package of Java
Java Util Package - Utility Package of Java       Java Utility package is one of the most commonly used packages in the java program. The Utility Package of Java consist 

Java Interview Questions

core java - Java Interview Questions
core java  What is the purpose of the System class? what... provided by the System class are standard input, standard output, and error... before you can define class methods. The following example defines 

Blog

Sitemap Core Java Tutorial Section
Map | Business Software Services India Java Tutorial Section Core Java... | Java Swing Tutorials | Java Servlet Tutorials | J2EE Tutorials Core Java... example | HashMap class in java | contains method of hashset in java 

Java Beginners

core java - Java Beginners
core java  what is object serialization ? with an example   Hi Friend, Please visit the following link: http://www.roseindia.net/java/example/java/io/SerializingObject.shtml Thanks 

Java Interview Questions

core java collection package - Java Interview Questions
.... http://www.roseindia.net/java/example/java/util/ Thanks...core java collection package  why collection package doesnot handle..., Java includes wrapper classes which convert the primitive data types into real Java 

Java Beginners

core java - Java Beginners
core java  Hi Friends, If in an application only one thread is there if i will use wait() method what will happened ????????????????any error will come ya that wait() method will work plzzzzzzzzzzzzzzzzzzzzzz tell me 

Java Beginners

core java - Java Beginners
core java  can we write a program for adding two numbers without... this example http://www.allcoolblogs.com/blog/2008/08/02/calculate-numbers-in-java/ it's about calculating two numbers Java Program Code for calculating 

Java Beginners

Core java - Java Beginners
Core java  Hello sir/madam, Can you please tell me why multiple inheritance from java is removed.. with any example.. Thank you...://www.roseindia.net/java/master-java/inheritance.shtml Thanks  Hi 

Java Beginners

Core Java - Java Beginners
Core Java  Can u give real life and real time examples of abstraction, Encapsulation,Polymarphism....?  I guess you are new to java and new to roseindia as well.. anyways given is the encapsulation example http 

Java Beginners

core java - Java Beginners
core java  catch(Exception e) { System.out.println(e); } what... to handle a run-time error. A try block must have at least one catch block... on as if the error had never happened. For more information, visit 

Java Interview Questions

core
core  where an multythread using   Please go through the following link: Java Multithreading 

Java Beginners

core java - Java Beginners
core java   How to reverse the words in a given sentence...{ System.out.println("This is reverse Example!") ; BufferedReader buff = new...); } } ------------------------------------------------------- Read for more information. http://www.roseindia.net/java/ Thanks 

Java Beginners

Core Java - Java Beginners
Core Java  How can we explain about an object to an interviewer ... and class methods. For example : class Myclass { String str... to : http://www.roseindia.net/java/master-java/java-object-oriented 

Java-Tutorials

Core Java Hello World Example
are used in this program. This is a basic example of core Java that explains how... a simple core Java "Hello World" application. The Hello World application... explains you how to start writing of your first Java class. Example First we 

Java Beginners

core java - Java Beginners
core java  pl. tell me about call by value and call by reference with example program. thanks   Hi Friend, call By value When you... change the fields in the caller?s objects they point to. In Java, you cannot 

Java Beginners

core java - Java Beginners
core java  how to reverse a the words in the sentence for example..... prashu prashobvee@gmail.com  Hi friend, i am sending running example...://www.roseindia.net/java/ Thanks & Regards Amardeep 

Java Interview Questions

Core Java-ArrayList
Core Java-ArrayList  How do i find duplicates in ArrayList. First i add some elements to ArrayList, then how do i find the duplicates and show the duplicate elements. Give an example 

Java Beginners

core java - Java Beginners
core java  Hi Guys, what is the difference between comparable and comparator i want with source code with example????????????? plzzzzzzzzzzz help me its very urgent in advance thanks  If you want to sort 

Java Beginners

core java
core java  how to display characters stored in array in core java 

General

Core Java Interview Questions!
Core Java Interview Questions   ...: Transient variable can't be serialize. For example if a variable is declared... if effectively replaces.  Example of classes: HashSet, HashMap, ArrayList 

Java Interview Questions

core java
core java  basic java interview question 

Development process Questions

core java - Development process
core java  what is an Instanciation?  Hi friend, When.... The process is known instantiation For example : class... to : http://www.roseindia.net/java/master-java/java-object-oriented-language.shtml 

Java Beginners

CORE JAVA
CORE JAVA  CORE JAVA PPT NEED WITH SOURCE CODE EXPLANATION CAN U ??   Core Java Tutorials 

Java Beginners

core java
core java  i need core java material   Hello Friend, Please visit the following link: Core Java Thanks 

Java Beginners

Core Java Exceptions - Java Beginners
Core Java Exceptions  HI........ This is sridhar... Error? How can u justify?  Hi friend, Read for more information. http://www.roseindia.net/java/ Thanks 

Java Beginners

Java Util Zip. Zip files/folders inside a folder, without zipping the original source folder.
Java Util Zip. Zip files/folders inside a folder, without zipping the original source folder.   import java.io.File; import... this code works wonderful, its another example from a different website. The only 

Java Beginners

Java compilation error - Java Beginners
Java compilation error  Hello, i am getting an error while running simple core java program on command prompt.java is installed on my pc.... For example if java is installed at c:\Program Files\Java\jdk1.6.0_01 

Java Beginners

core java
core java  Hi, can any one exain me the concept of static and dynamic loading in core java 

Java Beginners

core java
core java  Hi, can any one expain me serialization,Deseralization and exterenalization in core java 

Java Beginners

Core Java
Core Java  what is a class 

Java Interview Questions

Core JAva
Core JAva  how to swap 2 variables without temp in java 

Java Beginners

core java
core java  how can we justify java technology is robust 

Java Interview Questions

core java - Java Interview Questions
core java  Is there any Compile time exceptions in java?  Hi Friend, If the error occurs at runtime then it is known as Exception like class not found exception. IF the error occurs at compile time then it is said 

Java Beginners

java util date - Time Zone throwing illegal argument exception
java util date - Time Zone throwing illegal argument exception  Sample Code String timestamp1 = "Wed Mar 02 00:00:54 PST 2011"; Date d = new Date...()); The date object is not getting created for IST time zone. Java 

Development process Questions

Core JAVA - Development process
Core JAVA  hai This is jagadhish.I have a doubt in core java.The...); } } ------------------------------------------------------ Read for more information with Example. http://www.roseindia.net/java/ Thanks & regards Amardeep   

Java Interview Questions

Core Java - Java Interview Questions
Throw Keyword in Core Java  Why to use Throw Keyword in Core Java... that function, which rises an checked exception it gives the compile time error. Use...-catch, otherwise it gives the compile time error 

Java Interview Questions

CORE JAVA
CORE JAVA  What is called Aggregation and Composition 

Java Interview Questions

core java
core java  surch the word in the given file 

Training

Core Java Topics
Core Java Topics Following are the topics, which are covered under Core Java. In the roseindia website for core java, programmer will find completed details of every core java topic and simple example of core java that will help you learn 

Java Beginners

core Java programming
core Java programming  Hi, Thanks for ur previous answers.... I...;TIME:HHMMSS;ITEM1:QTY:PRICE;ITEM2:PRICE2;] They are looking for a Java Program... given dates For Example ITEM NOOFCUSTOMERS TOT_QTY 22 YYMMDD YYMMDD ITEM 

Java Interview Questions

core java - Java Interview Questions
core java  Hai this is jagadhish.Iam learning java.I have a doubt in core java that is,Is there any instanceInitialization() method is there.If any...; Hi friend, There is no method "instanceInitialization()" but java having 

Development process Questions

core java - Development process
core java  Hi i want core java code for this problem.its urgent... is divided up into a grid to simplify navigation. An example position might... visit to : http://www.roseindia.net/java/ Thanks 

Hibernate Questions

How to integrate core java with Hibernate
How to integrate core java with Hibernate  How to integrate core java with Hibernate How to integrate core java with Hibernate   xxxxxxxxx... link will provide you some tutorials of Core Java and Hibernate Integration.   

Java Beginners

core java
core java  its compulsory to save file name and class name is same in java 

Java Beginners

Core Java
Core Java  How to execute cmd command through java?? Give Code of them 

Development process Questions

core java
core java  write a java program to view product details from product table 

Java Interview Questions

CORE JAVA
CORE JAVA  What is Garbage collection in java? What is the role of a developer for garbage collection 

Java Interview Questions

Core Java - Java Interview Questions
Core Java  is there any use of private constructors?is yes ,how to use those, example please,  Hi public final class MyClass... } } ---------------------------- Read for more details. http://www.roseindia.net/java 

Java Interview Questions

Core java
Core java  difference between the string buffer and string builder 

Java Beginners

core java
core java  what is the use of iterator(hase next 

Java Beginners

core java
core java  please give me following output 

Java Beginners

Core Java
Core Java  Hi, Can any one please share the code for Binary search in java without using builtin function 

Java Beginners

Core Java
Core Java  Please write a Java Program to design login form and store the values in file & validate and display the MainForm 

Java Beginners

core java
core java  In java primitive variables will get its default value automatically after declaration. Then why it is mandatory to initialize a variable before using 

Java Interview Questions

Core java - Java Interview Questions
Core java  Hai this is jagadhish.Iam learning core java.In java1.5 I...; assert expression1 : expression2; For example class AssertionDemo...;= amount; return balance - amount; } } In above given example, main 

Java Beginners

core java - Java Beginners
core java  i want to get java projects in core java 

Java Interview Questions

core - Java Interview Questions
core  is java is passed by value or pass by reference?  hi... variables affect the caller?s original variables. Java never uses call by reference. Java always uses call by value. public class CallByValue 

Java Interview Questions

Core Java
Core Java   How can i write own compile time and runtime exceptions in java   Hello Friend, Please visit the following links: http://www.roseindia.net/java/exceptions/how-to-throw-exceptions.shtml http 

Java Interview Questions

Core Java
Core Java  Is Java supports Multiple Inheritance? Then How ?   Hi Friend, Java does not support multiple inheritance but it can be achieved by using the interface. In Java, Multiple Inheritance can be achieved through 

Java Beginners

Core Java
Core Java  Hi, Can any one please expain me why derived data types are required in java as we have primitive data types with us 

Java Beginners

Core Java
Core Java  Hi, Can any one please expain me why derived data types are required in java as we have primitive data types with us 

Java Beginners

Core Java
Core Java  Hi, can any one please tell me the uses of return type,"Super" and "this" calling statement in Java?? why do we required this,super calling statement?? why return type is required 

Java Beginners

Core Java
Core Java  How to load class dynamically in java ?   To load class dynamically you can use Class class method Class.forName("abc.xyz.MyClass"); This method load the given class at run time 

Java Interview Questions

core java - Java Interview Questions
core java  What are transient variables in java? Give some examples  Hi friend, The transient is a keyword defined in the java... relevant to a compiler in java programming language likewise the transient 

Java Interview Questions

Core java
Core java  how to convert reverse of String without using String function 

Java Interview Questions

core java
core java  Is it possible to create a shallow copy of an arraylist instance? if yes then please post the code 

Java Beginners

CORE JAVA
CORE JAVA  Tell me some Scenarios why you go for Abstract Class and Interface 

Java Beginners

core java
core java  Hi, Can any one please share a code to print the below: 1 121 12321 1234321 

Java Interview Questions

core java
core java  can i use native keyword with abstract method ? if yes explain and if no please explain 

Java Interview Questions

Core Java
Core Java  have to find the prime numbers which is less than the current prime numbers using loops 

Java Beginners

Core Java
Core Java  Write a Program to add given number of days to the current system date and display the same 

Java Beginners

core java
core java  what is the max size of array?   You can declare up to maximum of 2147483647 

Java Beginners

core java
core java  how to compare every character in one string with every character in other string 

Java Interview Questions

Core Java
Core Java  What is the significance of static synchronized method? Why do we have the method declared as static synchronized 

Framework Questions

error in sample example
error in sample example  hi can u please help me XmlBeanFactory class is deprecation in java 6.0 so, pls send advance version class   Use XmlBeanFactory(Resource) with an InputStreamResource parameter 

Java Interview Questions

Core Java - Java Interview Questions
Core Java  Hi What is the use of private static in java and when... the new value of the variable is provided to you. For example in the class... not out side the class : In the below example "staticMethodA()" not accessible 

Advertisements Advertisements
 

 

 

DMCA.com