35,618 Topics

Member Avatar for
Member Avatar for sun26

Hi all, Can you show me the way to change postfix expression to infix expression by using binary tree? How to specifix the root of that tree?

Member Avatar for quuba
0
80
Member Avatar for Blondeamon

Greetings i have created the above class to create rooms and exits of the rooms. That way every room is linked to another room and i can move between them. Now what i want to do is to add an image to every room that is stored inside the class. …

Member Avatar for quuba
0
131
Member Avatar for Sandar Khin

Hi all, I have two programs.One is for scrolling text.Code is here [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; class MarqueeTest { public static void main(String[] args) { MyFrame frame = new MyFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } } class MyFrame extends JFrame implements ActionListener { private ActionListener listener; private Timer t1; …

Member Avatar for quuba
0
133
Member Avatar for Java-newb

I am getting errors in my action listener brackets that I do not get, can someone help me please?? My buttons are not working, not sure what's happening. plus when I try to write [code] newGUI();[/code] I get another errors saying it cannot find the symbol, but my method is …

Member Avatar for javaAddict
0
137
Member Avatar for M.Jama

I'm too new in java and I always appreciated when you share with me your knowledge. Here I'm trying following self-test exercise; Give two declaration for two variables called feet and inches.Both variables are of type int and both are to be initialised to zero in declaration. I try this …

Member Avatar for javaAddict
0
1K
Member Avatar for Golam Kausher

The program will give the following output 55 45 36 28 21 15 10 6 3 1 0 Now, I have managed to print only the followings: 55 45 36 28 21 // This line with some kind of error though it ran. Now what should be the addtional codes …

Member Avatar for javaAddict
0
117
Member Avatar for sridhar123

i installed blazix server in my pc ,but i cant able to run my jsp program please help me

Member Avatar for catchybread
0
104
Member Avatar for feoperro

Hi, I would like to know if it's possible to specify the "target='FrameName'" in response.sendRedirect("Home.jsp") by any chance? I tried this: [CODE] <!-- Security Check --> <form action="Login" target="_top"> <% if ((String) request.getSession(false).getAttribute("sessionStatus") == null) { response.sendRedirect("Login?pageTimeout=yes"); } %> </form> <!-- Security Check --> [/CODE] But it doesn't work... The …

Member Avatar for feoperro
0
996
Member Avatar for chuppy

hi..can anyone explain to me?? i am very confused abt this two.. for example; iint m [] = { 3, 2, 5, 2 }; int k = 0; System.out.println("(a)" + m[ k++ ]; System.out.println("(a)" + m[ ++k ]; *i compiled..but i dun understand why is the result 3 and 5 …

Member Avatar for javaAddict
0
88
Member Avatar for mohammad007
Member Avatar for vladacmba

Hy everyone, Thank you for taking your time to explaind me this, I very thankful for all of you. I'm been searchin what kind of a Script is it - so foergive me if I'm at wrong post - but no luck. Take a look at this 2 website examples …

Member Avatar for javaAddict
0
89
Member Avatar for TigerGirl

How would you draw a expression tree that is (a-2/(5 * b) plus 3) * (2 * d)? I am really confused on the first parenthesis. Thank you for your help.

Member Avatar for TigerGirl
0
65
Member Avatar for TigerGirl

Hello I am trying to read a node that will find the longest word in a tree. So, my method is a public static int word(Node d) So how would I have to find the length of that node? Would I just use the string that was made in the …

0
110
Member Avatar for Sandar Khin

I have a program. Here import java.awt.*; import java.awt.event.*; import javax.swing.*; class MarqueeTest { public static void main(String[] args) { MyFrame frame = new MyFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } } class MyFrame extends JFrame implements ActionListener { private ActionListener listener; private Timer t1; public MyFrame() { Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); setSize(d.width,d.height); …

Member Avatar for Sandar Khin
0
174
Member Avatar for prelyptica

I an trying to write a few java classes, which I wrote successfully, but when I am tryin to test it I get some weird errors and I cant figure out why, so i'd be very grateful for your expertise. The code for the GCD class is: [code] public class …

Member Avatar for thines01
0
193
Member Avatar for romilc

[CODE]<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import = "javax.swing.*" import="DefaultNamespace.user"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Play Tic-Tac-Toe</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td>&nbsp;</td> </tr> <tr> <td> <div align="center"> <font color="#19A1CB" size="2" face="Verdana, Arial, Helvetica, sans-serif"> <span><b>Tic …

0
62
Member Avatar for ryno365

Hey DW. Working on a nice poker application and need some help. Right now I'm trying to go through two arraylists, one of chars and one of sorted ints (representing the suites, and numbers of the cards) and delete duplicating numbs (and the char/suite counterpart in the other array). In …

Member Avatar for ryno365
0
100
Member Avatar for shroomiin

hello everyone, i am trying to write a code that displays a table with 75 years. each year has to display the world population and the projected population for the following years after that by multiplying the current population by the yearly growth (1.17) but i am running into some …

Member Avatar for Ezzaral
0
132
Member Avatar for junglee

i`m making Quiz program which asking State and you answer capital. here is code import java.util.*; import java.awt.*; import java.applet.Applet; import java.awt.event.*; import java.io.*; import java.util.Random; public class Quiz extends Applet { private String textfile = null; private TextPanel text_p = null; private Vector question = new Vector(); private Vector …

Member Avatar for quuba
0
299
Member Avatar for YingKang

the program draws lines, but every time I draw a new line, the previous one disappears. How can I let it show all the lines drawn? I know my problem is in the array, but how to fix it? thanks for help [code] import javax.swing.JPanel; import java.awt.*; import java.awt.event.*; import …

Member Avatar for YingKang
0
823
Member Avatar for whiteyoh

Hi all, On compiling, i get no errors at all, the data is taken, but when checking the database, a record is made, but it is NULL. What have i missed? [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. …

Member Avatar for Ezzaral
0
161
Member Avatar for kilermage

I run the program, from what I see the game runs fine. Then when I click on the object that suppose to send a dialogue, it disconnects me and throws this error in the run.batch window. [CODE]Exception in thread "main" java.lang.NullPointerException at NPCDialogue.UpdateNPCChat(NPCDialogue.java:18) at client.process(client.java:8471) at PlayerHandler.process(PlayerHandler.java:137) at server.main(server.java:55)[/CODE] Here …

Member Avatar for ejosiah
0
154
Member Avatar for karthik.c

hi guys im tryin to do a java client / c++ server socket program .in the java client program i serialize the object and pass them over socket to c++ server.now when im gettin them in c++,im not able to deserialize it properly as i tried for binary serialization since …

Member Avatar for ejosiah
0
599
Member Avatar for whiteyoh

Hi all, this is a bit of a follow on from a previous post, but slightly different so thought a new post would be best. i want to pass my scanner variables into an object. the following is the last scanner (Added as example), followed by the creation of a …

Member Avatar for whiteyoh
0
119
Member Avatar for farahshafilla

hai... i need idea how to make security code in jsp.. for example: when we register to any website, mostly we need to fill the security code that appear at the registration form page. so how can,I as a developer to do that security code? this is the example of …

Member Avatar for muhdadeel
0
200
Member Avatar for whiteyoh

Hi all, I have a constructor with 2 numbers both set as longs however in my driver class, it is showing as an error, even after casting the already longs to a long again. This is constructor [code]public Personal(String forename, String surname, long dob, String add1, String add2, String county, …

Member Avatar for whiteyoh
0
105
Member Avatar for calcucool

i need to write a method that in my program student object for the student class that validates it's own data. background on student class: it's a program that ask for a name of a student and 3 test scores and print the highest , the lowest and the average. …

Member Avatar for javaAddict
0
105
Member Avatar for selvasmartmccan

I want to use XML file to insert some data and want to upload that data into my JSP page. That is "XML parsing in JSP" but i tried using JDOM parser but i cant able to get ... any one know dis???????

Member Avatar for peter_budo
0
35
Member Avatar for shroomiin

Hey everyone. I have to write a program that estimates the value of mathematical constant e by using the following formula and i have to allow the user to enter the amount of terms to calculate. the only problem is i dont really know how to get started with this. …

Member Avatar for javaAddict
0
104
Member Avatar for verilu

So, I'm stuck trying to figure out how to move the object. I am using the keyboard as a call to Key Event to move the object. Right now, it isn't moving. I'm pretty sure that this is correct. [CODE]import java.awt.Color; import javax.swing.*; import java.awt.Graphics; import java.awt.Image; import java.applet.Applet; import …

Member Avatar for nambro
0
110

The End.