Home Tutorialhelp Comment I THINK THAT'S WRONG

 
 

Comment

jhabz
I THINK THAT'S WRONG,
December 10, 2009 at 2:16 AM

there's must be something wrong?!

why do you need to display the variable a?

what is the value of "a"?

is that an input variable or what ?

and you havent push an element .. YOU MUST ..
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Beginners

stack - Java Beginners
on Stack visit to : Thanks   http://www.roseindia.net/java/example/java/util/ Thanks  I think there is bit wrong in the above answer... that inputs a line of text and uses a stack object to print the words of the line 

Java Beginners

ADT stack - Java Beginners
ADT stack  Design a Java interface for ADT Stack. Develop two...("Stack is empty"); return; } else { String str = " "; for (int i = 0; i <= top....  Hi Friend, Try the following codes: ADT Stack: import 

Java Beginners

ADT stack - Java Beginners
]. 2)Design a Java interface for ADT Stack. Develop two different classes...ADT stack  I want a algorithm for the below programs.... 1)Implement Lisp-like list in Java. Write basic operations such as 'car', 'cdr', and 'cons 

Mobile Applications Questions

wrong year
wrong year..   I think u are using other calendar Check Settings... wrong year  hello I m using the following code: NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateFormat:@"yyyy"]; NSDate *date 

Java Interview Questions

Generic Java Stack
Generic Java Stack  Hi here the question the interviewer asked me- package jp.co.worksap.intern; /** *The Stack class represents a last-in-first-out(LIFO) stack of objects *And this class can look at the object 

General

Revisiting Stack Trace Decoding,java tutorial,java tutorials
Revisiting Stack Trace Decoding 2003-01-28 The Java Specialists' Newsletter... newsletter, I mentioned that you could decode the stack trace to find out where... immediately when something went wrong. I present a new interface called 

Java Beginners

Problem in card demo example.
Problem in card demo example.  Hi, I have successfully shows... help me, I am using Eclipse and card demo example by following link http.../java/swing/drag-drop.shtml   I have checked all the links, thanks 

Java Beginners

Java Stack - Java Beginners
Java Stack  Can you give me a code using Java String STACK using the parenthesis symbol ( ) the user will be the one to input parenthesis......) if Open parenthesis push it to stack otherwise Pop the stack Thank you 

Java Beginners

Stack Implementation java code - Java Beginners
Stack Implementation java code  Hello roseindia and java experts can u help me.can you give me a code for this sir/maam.thank you so much. STACK...(*) Invalid G) (A*(B+C)) Valid H) ((A*(B)) Invalid I) (A+B) (A+C) Valid J) (A+B 

Java Beginners

stack and queue - Java Beginners
stack and queue  write two different program in java 1.) stack 2...://www.roseindia.net/java/example/java/util/StackImplement.shtml http://www.roseindia.net/java/example/java/util/QueueImplement.shtml Hope 

Java Beginners

Stack
Stack  How to implement a stack using classes in java?   Here is an example that implements a Stack class based on arrays. public class Stack { private int top; private int[] storage; Stack(int 

Core Java

Java Stack
java stack click on the link: http:/www.roseindia.net/java/beginners/stack... Java Stack       The Stack class works on the principle last-in-first-out (LIFO) stack of objects 

Java Beginners

java using Stack - Java Beginners
java using Stack  How convert decimal to binary using stack in java 

Java Beginners

java using Stack - Java Beginners
java using Stack  How convert decimal to binary using stack in java? whats the java program or code to that. Thank you rose india and java... the number: "); int num = input.nextInt(); Stack stack = new Stack 

Ajax Questions

Ajax demo
Ajax demo  Hi, I am new to Ajax and I want to see the running example of Ajax examples. Various types of Ajax demo application will help me in understanding the features and capabilities of Ajax frameworks. I want to know 

Java Beginners

Java stack help
Java stack help  How would I use stacks in java to do a calculation like: 4*((3+3)/(5-3 

Java Beginners

What's wrong with my form? - Java Beginners
What's wrong with my form?  Dear expert, I'm having trouble with my enquiry form. Hope you can tell me where my mistake lies. Thanks. Here's my jsp code: Enquiries var objForm = new Object 

Java Beginners

Java String using STACK - Java Beginners
Java String using STACK  Can you give me a code using Java String STACK using the parenthesis symbol ( ) it tells its Valid or Invalid it tells it excess parenthesis if Open parenthesis push it to stack otherwise Pop 

JavaScript Questions

calculator in java with stack
calculator in java with stack  i want calcultor with interface in java and in interface there is button called postfix ,,, when the user enter... then result plz help me i have project in it ,,i must make interface like that and every 

Core Java

Java Stack Example
Java Stack Example In this section we will read about how you can provide... and there is no more element is to be removed i.e. the stack is empty. In Java Stack... the stack collection in the Java programming. In this example you will see how 

Java-Tutorials

Implementing a Stack in Java
Implementing a Stack in Java       In this section, you will learn how to implement a stack in Java. A Stack is like a bucket in which you can put elements one-by-one 

Java Beginners

stack in java/
stack in java/  java code for stack push pop and display operation? thanks 

HTML Questions

Autocomplete demo not working
Autocomplete demo not working  Hi Team, I am so happy with our... I have copied the source files to my local machine and renamed the autoComplete.txt to autoComplete.html then i run html file. I can see a text box 

HTML Questions

Autocomplete demo not working
Autocomplete demo not working  Hi Team, I am so happy with our... I have copied the source files to my local machine and renamed the autoComplete.txt to autoComplete.html then i run html file. I can see a text box 

Programming Tutorials

Java Stack ADT
Java Stack ADT You all are familiar with the data structure 'Stack'. The Stack ADT is same as Stack. It is a LIFO data structure where insertions and deletions always occur at the same end. This end is called the top of the stack 

Java Beginners

What's wrong with my pagination code in JSP?
What's wrong with my pagination code in JSP?  Dear experts, I've tried the following codes which I have copied from Java Ranch forum and deleted... is that it can display all 10 records but I only want 5 records to be shown 

Java Beginners

how can create album in java by using Stack ....
how can create album in java by using Stack ....  hi all , if i press push button put the image to the stack , and when i press pop button remove the image ..??? please help me please 

Java Beginners

Use a tree stack to sort number in java?
Use a tree stack to sort number in java?  The Question is : Three...(); } System.out.println("The Output Stack is: " + OutPut); } } the answer i get...] i want to get the sorted stack in Output stack 

Java Beginners

Use a tree stack to sort number in java?
Use a tree stack to sort number in java?  The Question is : Three...("The Output Stack is: " + OutPut); } } the answer i get is The Input Stack is : [90, 21, 33, 80, 67] MAx: 67 Value: 80 The Output Stack is: [80] i want 

Java Beginners

Use a tree stack to sort number in java?
Use a tree stack to sort number in java?  The Question is : Three...("The Output Stack is: " + OutPut); } } the answer i get is The Input Stack is : [90, 21, 33, 80, 67] MAx: 67 Value: 80 The Output Stack is: [80] i want 

Java Beginners

Use a tree stack to sort number in java?
Use a tree stack to sort number in java?  The Question is : Three...(); } System.out.println("The Output Stack is: " + OutPut); } } the answer i get...] i want to get the sorted stack in Output stack 

Java Beginners

Use a tree stack to sort number in java?
Use a tree stack to sort number in java?  The Question is : Three...(); } System.out.println("The Output Stack is: " + OutPut); } } "); the answer i get... is: [80] i want to get the sorted stack in Output stack 

Java Beginners

Use a tree stack to sort number in java?
Use a tree stack to sort number in java?  The Question is : Three...(); } System.out.println("The Output Stack is: " + OutPut); } } the answer i get...] i want to get the sorted stack in Output stack 

Java Beginners

How can I write a GUI stack program by Java to push Image files instead of other data type items?
How can I write a GUI stack program by Java to push Image files instead of other data type items?   How can I write a GUI stack program by Java to push Image files instead of other data type items? for the push instruction I 

Ajax Questions

java technologies stack
java technologies stack  java technologies stack 

Java Beginners

what is wrong with this program
what is wrong with this program  import java.io.*; class Distance...=Integer.parseInt(ob.readLine()); } void add(int d1,int d2) { int f,i; feet=d1+d2; inch=d1+d2; if(inch>=12) { f=inch/12; i=inch%12 

Java Beginners

what should i do next?? - Java Beginners
what should i do next??  I know java basics.actully i passed the SCJP....  i think first u should go through servlet bcoz at last ur jsp code... is good for java in AmeerPet.Don't think it as bad.He is good faculty thus y. Thank 

Java Beginners

What is wrong with my servlet?
What is wrong with my servlet?  I'd like to know which part of the code is wrong. My code is: print("code sample"); import java.util.*; import... { // not first buy for(int i =0; i &lt; buylist.size(); i 

Java Beginners

what is wrong in this program
what is wrong in this program  import java.io.*; class Distance... in inches "+inch); } void add(Distance d1,Distance d2) { int f,i...) { f=inch/12; i=inch%12; feet=feet+f; inch=i 

General

Stack Overflow - Java Tutorials
Stack Overflow in Java A stack is the part of the memory. The local automatic variable is created on this stack and method arguments are passed. When a process starts, it get a default stack size which is fixed for each process.  

Java Beginners

This is what i need in this Question - Java Beginners
array. so i need your help to know is it correct or wrong Thank you...This is what i need in this Question  You are to choose between two... explaination with out coding In my understanding I choose the non-empty array 

Java Beginners

how can i close a frame. - Java Beginners
how can i close a frame.  Hi, My question is how can we close a frame when an action is taken......For example let us think that we have a frame...............my target is when i click on that button, a new frame is coming and updated table 

Java Beginners

Am i convetrting the code right ? - Java Beginners
a led on it. The LED blinks on the C#'s code. I think the code i have written...Am i convetrting the code right ?  C# private void button...; sp.WriteLine("Hello World!"); sp.Close();} Java Enumeration pList 

Java Beginners

Java collection Stack example
Java collection Stack example  How to use Stack class in java collection?   The Stack class uses the First In Last Out(FILO) mechanism... :- -1 Description:- The above example demonstrates you the Stack class in java 

Java Beginners

heap and stack memory
heap and stack memory   hi i am jane pls explain the difference between heap memory and stack memory with example programs 

Java Beginners

I wonder - Java Beginners
I wonder  Write two separate Java?s class definition where the first one is a class Health Convertor which has at least four main members: i. Attribute weight ii. Attribute height iii. A method to determine number 

Core Java

Java Stack Example
Java Stack Example In this section you will learn about Stack class  in java, how to use Stack in java. Before going into details we should know what... the item in the stack and how far it is from top of stack Example : A Java code 

Java Interview Questions

remove element from stack
Stack(); Scanner scan = new Scanner(System.in); for(int i = 1; i <= 5; ++i) { System.out.println("Stack contains: " + stringSS.size... <= 5; ++i) { System.out.println("Stack contains 

Java Beginners

heap and stack memory
heap and stack memory   hi i am jane pls explain the difference between heap memory and stack memory   STACK memory is referred as temporary memory,if you come out of the program the memory 

Java Beginners

Java I/O - Java Beginners
Creating Directory Java I/O  Hi, I wanted to know how to create a directory in Java I/O?  Hi, Creating directory with the help of Java Program is not that difficult, go through the given link for Java Example Codehttp 

Java Beginners

Hello World - Java Beginners
...){ System.out.println("Hello World!"); } } what am I doing wrong. Am I expecting too   Hi friend,i saw your program. your program is correct, i think...Hello World  Java Beginner - 1st day. Looked at the Hello World 

Java Beginners

java i/o - Java Beginners
java i/o  thnx alot sir that this code helped me much in my program... so that i could write it line by line such as- Hello Java in roseindia Hello... Java in roseindia Hello Java in roseindia Hello Java in roseindia Hello Java 

Java Beginners

java i/o - Java Beginners
java i/o  Dear sir, i wrote a program where program asks "Enter your... gets closed. when i open the program again and enter text in this case previous texts get replaced with new text. i tried my best but got failed plz tell me 

SQL Question

Sql aggregate function with left join wrong output
Sql aggregate function with left join wrong output    I have three... I ma getting wrong sum values of i.InvoiceQuantity,p.IssueQuantity column...(i.InvoiceQuantity),sum(p.IssueQuantity) from Stock s left join InwardEntry i 

SQL Question

Sql aggregate function with left join wrong output
Sql aggregate function with left join wrong output    I have three... I ma getting wrong sum values of i.InvoiceQuantity,p.IssueQuantity column...(i.InvoiceQuantity),sum(p.IssueQuantity) from Stock s left join InwardEntry i 

SQL Question

Sql aggregate function with left join wrong output
Sql aggregate function with left join wrong output    I have three... I ma getting wrong sum values of i.InvoiceQuantity,p.IssueQuantity column...(i.InvoiceQuantity),sum(p.IssueQuantity) from Stock s left join InwardEntry i 

Java Beginners

hi.. i hv few error. pls. - Java Beginners
hi.. i hv few error. pls.  hi sir, i have few error. can u pls help me. pls. im very new in java. ths my Uni assgmnt. please help me... import...; default: System.out.print("Wrong Info 

Java Beginners

file i/o - Java Beginners
file i/o  hiii, i have to read some integers from a text file and store them in link list.. so please can i have source code for it.?? thanks 

Java Beginners

Not sure whats wrong with my code HELP PLEASE?!?!
Not sure whats wrong with my code HELP PLEASE?!?!  I cant figure out what I am doing wrong in my code can anyone help me out??? Grades function computeGrade( ) { var hw, lab, midt, fin, avg; hw = parseFloat 

Java Beginners

File I/O - Java Beginners
File I/O  Suppose a text file has 10 lines.How do I retrieve the first word of each line in java? abc fd ds 10 fg yy6 uf ui . . . . . . yt oi oiu 25 ewr ytro 9+ po I want to retrieve 'abc' 'fg' .... 'yt' 'ewr 

Java Beginners

File I/O - Java Beginners
File I/O  How to search for a specific word in a text file in java?  Hi Arnab, Please check the following code. ===================== import java.io.File; import java.io.BufferedReader; import 

Java Beginners

This is what i need - Java Beginners
This is what i need  Implement a standalone procedure to read in a file containing words and white space and produce a compressed version of the file.... for this question i need just : one function can read string like (I like 

Java Tips and Examples

Example of Java Stack Program
Example of Java Stack Program       Stack is like a bucket we you can enter objects and retrieve it. Here in the example describes the methods to prepare an example of Java stack 

General

Java get Stack Trace
Java get Stack Trace       In this section, you will learn how to obtain the stack trace... to print out the exception stack trace to catch the error instead of using 

JSP Servlet Questions

what is wrong with my JSP codes for updating a form?
what is wrong with my JSP codes for updating a form?  Hi experts, I have tried to emulate a code from a textbook but it doesn't work in my program. Hope someone can advise me where I had gone wrong. Tks. I've set up my 

Java Beginners

according to me its ok but is calculating wrong values in
according to me its ok but is calculating wrong values in   program... += 5; break; case 'I...': decimal2 += 5; break; case 'I 

Java Beginners

Java program? - Java Beginners
the exact ans. as in the question. I also think the last double vescape... are doing is giving the wrong i/p. Here you are calculating escape velocity...Java program?  In order for an object to escape planet's 

Java Beginners

java - Java Beginners
information on Stack or Heap Visit to : http://www.roseindia.net/java/java-get-example...://www.roseindia.net/java/beginners... friend, Difference Stack vs Heap Stack When a function or a method 

HTML Questions

Autocomplete demo
Autocomplete demo   Thanks for the autocomplete demo, it's working fine but results are showing in different fashion Please see attached image. Can some one help me 

HTML Questions

Autocomplete demo
Autocomplete demo   Thanks for the autocomplete demo, it's working fine but results are showing in different fashion Please see attached image. Can some one help me 

Java Tips and Examples

Drag Demo
Java NotesExample - DragDemo.java This is an example of DragDemo in Java applet.   You can test the example on this page.   Drag... be easily displayed.   Here is demo example applet. Demo of the applet 

Java Tips and Examples

Card Demo
Java: Example - Card Demo This program reads in a bunch of images (cards...[] args) { JFrame window = new JFrame(); window.setTitle("Card Demo... CardDemoGUI.java provides the GUI to this demo program 1 2 3 4 5 6 

Java Tips and Examples

Paint Demo
Java NotesExample - PaintDemo.java This simple paint program leaves much to be desired, but it is a good example of event-driven programming, showing how...); this.setTitle("Paint Demo"); this.pack(); }//end constructor 

Java Beginners

what is wrong in this program?I have netbeans 7.0 & jdk 7. please do corrections.
what is wrong in this program?I have netbeans 7.0 & jdk 7. please do corrections.  import java.io.*; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.List 

Java Beginners

No matter what i do, eclipse applet WON'T PLAY SOUND - Java Beginners
No matter what i do, eclipse applet WON'T PLAY SOUND  OK, so I tried the code in http://www.roseindia.net/java/example/java/applet/PlaySoundApplet.shtml online, and it worked, but after i transfer the code EXACTLY to my pc 

Java Beginners

java concepts - Java Beginners
java concepts   i need theory for designing a java interface for adt stack .develop two different classes that implement the interface one using array and another using linkedlist 

Java-Tutorials

What is the flaw with the Stack class?
There is a flaw in the current stack class and it has become a matter... inheritance rather than composition and does not completely follow the Stack ADT (abstract data type). Stack defines methods such as push(), pop(), and peek(). Being 

Java Beginners

Parameter month I Report - Java Beginners
Parameter month I Report  hy, I want to ask about how to make parameter in I Report, parameter is month from date. How to view data from i report... like Java/JSP/Servlet/JSF/Struts etc ... Thanks 

Java Beginners

Which gives better performace Stack vs Arraylist
Which gives better performace Stack vs Arraylist  I want to implemet a generic Stack implementation. I am confused whether to use java.util.Stack class or to simulate ArrayList as Stack? I am very much concerned about performance 

Java Beginners

Object in java - Java Beginners
Object in java  Hi deepak, I am new to java, can u tell me what...://www.roseindia.net/java/beginners/nonstaticvariable.shtml Thanks... : When we create object from a class, it is created on stack or on heap 

Java Beginners

I need your help - Java Beginners
I need your help  What is the purpose of garbage collection in Java, and when is it used?  Hi check out this url : http://www.artima.com/insidejvm/ed2/gc.html http://java.sun.com/javase/technologies/hotspot 

Java Beginners

programme - Java Beginners
programme  java programme to implement stack operation?use stack... str="madam"; Stack s= new Stack(); int i,count=0; char array... visit the following link to get the stack implementation: http 

Java Beginners

java programming - Java Beginners
java programming  how can i program the queue and the stacks. ...]); Queue queue = new LinkedList(); for (int i = time; i >= 0; i--) queue.add(i); while (!queue.isEmpty 

Java Beginners

java compilation error - Java Beginners
java compilation error  Hello, I sent a previous message regarding... because I figured out I had the codes typed in wrong. After I corrected... in "logo.jpg" but I couldn't find any pictures to save it as a resource so I think 

Java Beginners

Parameter month I Report - Java Beginners
Parameter month I Report  ok, my problem now is in Report in java with I report. I want to give parameter month/year to my design in I Report... to I Report design. Thank's   Hi friend, Code to help in solving 

Java Beginners

Hi ..I am Sakthi.. - Java Beginners
Hi ..I am Sakthi..  can u tell me Some of the packages n Sub... that is available in java and also starts with javax. package HEMAL RAJYAGURU  ... tabbedPane = new JTabbedPane(); Component panel1 = makeTextPanel("Java 

Java Beginners

reply me its urgent - Java Beginners
urgent.  hi friend, i think password is wrong or username may be wrong...reply me its urgent  Hi friends I am facing problem in my application in this type please help me i am using database mysql5.0 version 

Programming Tutorials

How to Print a Stack Trace Message
How to Print a Stack Trace Message  Debugging of Java program requires... your problem at Discuss: printStackTrace in JSP. As we have seen that java... if you print a stack trace from the exception using the printStackTrace 

Java Tips and Examples

Menus
Java: Menus Types of menus Think of a menu as a way to arrange buttons... 12 13 14 15 // File : menus/MenuDemo.java // Purpose: Simple demo... // File : menus/MenuDemoGUI.java // Purpose: GUI for menu demo. Subclasses 

General

Java get Stack Trace as String
Java get Stack Trace as String       In this section, you will learn how to get the stack trace...(printWriter)-  This method prints the throwable exception and its stack trace 

Java Beginners

java - Java Beginners
java  hi i am a beginner in java. I have to make a mini project in java. I think about to develop a web page using java so any one please guide me how to develop web page using java 

Java Beginners

I face some problem - Java Beginners
I face some problem  I face some problem in my project plz deepak halp me how can i solve this problem i m using bean and jsp file also. and deployee the using tomcat server plz help me how can i solve thisproblem HTTP Status 

Java Beginners

I need your help - Java Beginners
I need your help  For this one I need to create delivery class for a delivery service .however, this class should contain (delivery number which... the file name is ApplicationDelivery.java Your program must follow proper Java 

Java Beginners

I need help in doing this. - Java Beginners
I need help in doing this.  Student DataBase i will need creating... objects that will house the birthdates for each student member. (I have... + "/" + year); } } Since these are parallel arrays, the data for student[i 

Java Beginners

Java programmes - Java Beginners
Java programmes  1. Develop a Java package with simple Stack... values in stack using push() method... "); for(int i=1;i<=5;i... for Complex numbers in Java. In addition to methods for basic operations on complex 

Java Beginners

Text File I/O - DVD.java - Java Beginners
Text File I/O - DVD.java  NEED HELP PLEASE. The application should... the array to recreate the file. Here is my code but I need to modify it to the specifications on top. I don't know where to begin. Thanks. //package dvd 

Struts 2 Tutorials

Value Stack / OGNL
Value Stack / OGNL Object Graph Navigational Language (OGNL) is a open source framework used to get properties from Java Beans. In Struts 2 framework, OGNL provides way to access objects within the value stack. OGNL is a fully featured 

Java Beginners

urgent-Exception in Tomcat - Java Beginners
urgent-Exception in Tomcat  I am using eclipse ee and tomcat server... The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs...; Hi Friend, It seems that you have used wrong 

Java Beginners

object creation - Java Beginners
object creation  I need object creation in depth(with stack,pc registers).Any one can provide me if possible with video/audio 

Java Beginners

java program - Java Beginners
java program  if c = 2 find d = ++c++++4 answer shows 3+2+4+1 9+1 10 I think d = operator mistake, pls clarify what operator do this formula tapas 

Advertisements Advertisements
 

 

 

DMCA.com