32,204 Topics
| |
So I am working on storing inorder traversal indices associated with every node in a BST (So if I add BAC, then the inorder index of A = 0, B = 1, C =2). The thing is that whenever you add a new node to a BST, you must recompute … | |
/** * Simple math application using a scanner input * @version 1.00 2010/1/26 */ import java.util.*; import java.text.*; import java.io.*; public class mathopr { public static void main(String[] args) { double num1,answer1,answer2,answer3=0; String myname; String reply; char replyChar=; Scanner input = new Scanner(System.in); DecimalFormat df= new DecimalFormat("00.00"); while (replyChar=='y'){ System.out.println("Please … | |
hi, i m facing a small prob in GUI, need to save my output to a particular folder. below this code showing the square of any integer in TextField named: "resultField". i've a button "save" that need to save the result from that TextField, suppose in my "c:\Repository " folder … | |
Is there a simple way to find and store the depth of every node in a BST using recursion? I can't seem to figure out a straightforward way of doing so. | |
I'm fairley new to programming in general being a fresh IT graduate. Some software I am developing needs to be able to compress a folder in to a .zip file and later extract it while maintaining its file structure. I am able to do this but extracting the file takes … | |
[CODE]import javax.swing.JOptionPane; public class test{ public static void main(String args[]){ String numT = JOptionPane.showInputDialog(null,"Please enter a value."); double num1 = Double.parseDouble(numT); System.out.println("Fahrenheite = "+num1+"\nCelcius = "+convertFtoC( num1 )); } public static double convertFtoC ( double num1 ){ return ((5/9)*(num1-32)); } }[/CODE] why the value return is zero? hrm... can anyone … | |
Hello, When I add a simple <c:set var="foo" value="bar"/> line to my jsp I get the following error: javax.servlet.ServletException: javax/el/ELException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) root cause java.lang.NoClassDefFoundError: javax/el/ELException java.lang.Class.getDeclaredMethods0(Native Method) java.lang.Class.privateGetDeclaredMethods(Unknown Source) java.lang.Class.getDeclaredMethods(Unknown Source) java.beans.Introspector$1.run(Unknown Source) java.security.AccessController.doPrivileged(Native Method) java.beans.Introspector.getPublicDeclaredMethods(Unknown Source) java.beans.Introspector.getTargetMethodInfo(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) java.beans.Introspector.<init>(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) … | |
Hi everyone I have one we application developed using java,servlet and jsp. i am running it using Apache tomcat server 5.5. When i am running it on my local machine, i am given path as [B][url]http://localhost:8080/student/[/url][/B] where as student is name of application. Now if i require run same application … | |
I'm fairley new to programming in general being a fresh IT graduate. Some software I am developing needs to be able to compress a folder in to a .zip file and later extract it while maintaining its file structure. I am able to do this but extracting the file takes … | |
This is not seek for IDE thread but rather want just to know your beloved IDE. For Me, up to recently I used Eclipse but now I'm trying IntelliJ Idea community. Not very used to it but looks promising. What about you friend? | |
Hello, i have a few questions regarding - writing software and using that software in my cell phone. -Which language is best for cell phone software? - Can i use java, and would that be the easiest? -where do i even start when i begin to write a cell phone … | |
I need to be able to choose one of the three boxes and have then drag around the screen, i can only get 1 of them, kinda of. I want to be able to drag the red one, or the green. I can kinda get the green to drag but … | |
Are objects that are instantiated from their respective class done so within the code of the class itself (as in on the same document (Class.java) or are they created from the code in main method of the program (Main.java). More questions to build on this... Thanks ahead of time! -Isaiah … | |
[code=Java] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package paint1; import java.awt.event.*; import java.awt.*; import javax.swing.*; import java.awt.image.*; /** * * @author Jeanine */ public class MyPanel extends JPanel { private int startX, startY, endX, endY; public int … | |
I am new to Java and have a class assignment that I need help with.. The assignment is to write a program that computes the tax and tip for a restaurant bill. User is to enter the total amount of the bill. Tax is 6.75% of the bill. The tip … | |
i am creating a program for hotel management,i want to get the source from JButton and JCheckBox at the same time,how do i do with actionListener? [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class HotelManagementGUI extends JFrame implements ActionListener {static final String[] rommcouplesea={"1","2","3","4","5","6","7","8","9","10"}; static final String[] roomcoupleroad={"1","2","3","4","5","6","7","8","9","10"}; static final … | |
Hello could someone please help me as my program is generating some weird error" java.lang.IllegalArgumentException: adding a window to a container" Could someone please look at it and tell me what I'm doing wrong. Im trying to add an object of fan to the panel it creates that error. whenever … | |
I have created a function that is supposed to go through a text file (csv) and read the information in it and then add it do a dataobject (which just holds the info in textfields and a combobox) which when filled adds itself to the jpanel. The issue I am … | |
hello can you help me on this i have gel compiler then i want to debug my program but the debug button is not highlighted then it can't be click...ahm can you help me on this or please suggest me if what is the best compiler for java?...thanks in advance … | |
[code]import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.ServerSocket; import java.net.Socket; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.JScrollPane; import javax.swing.JTextArea; … | |
i am doing project in java.... can any one suggest how to write code for mathematical regression in java.. .or did any one have code for that...... any website is there to learn for mathematical regression... | |
Hello everyone, I am using the code below. It is working when I used this in Eclipse. What I did is to place the generated keystore from the InstallCert.class ([url]http://blogs.sun.com/andreas/resource/InstallCert.java[/url]) to the latest JRE in the Program Files>Java But when I deployed this class in the Tomcat/Bea its searching I … | |
iam currently on a program that reads two integers values, with the second has to be a non-zero integer. here is my codes so far: Does it look ok ? PLEASE HELP !:( [CODE]public class Lab2App { public static void main(String[] args) { // Calculate 5 and 3 with relation … | |
the application below is what i did so far, please give me feedback the Payroll Program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked. Use a constructor to initialize the employee information, and a method within … | |
The following lab was originally assigned but skipped over because we were off for MLK day. I would still like to do it but am just not following what I should be doing. Help? In this lab you are going to extend the code you wrote in you first lab. … | |
I am having some problems with my java code, i am trying to write a C compiler and am currently working on developing a string tokenizer for the C programming language using java regex. my problem is first my program wont recognize multiline comments and second i cant figure out … | |
This is probably a stupid mistake but I can't see the issue, it's with the if statement at the bottom: [code=java] /** * Write a description of class Order here. * * @author David Taylor * @version 1.0 */ import javax.swing.*; import java.text.DecimalFormat; public class Client { // instance variables … | |
I've been having problems with the now deprecated mouseDown and mouseDrag methods, I know the deprecation causes no problem, the program runs fine, but for grading purposes I want my program to be error and warning free, is there any EASY alternative that can solve this deprecation method? I know … | |
hi all does any 1 here know how to save a Gnatt Chart to png file? thanks! | |
hi does any 1 can show me a simple code how to show a picture on a j2me cellphone? what i want to do is: i have a tcp server based on j2se. i want it to send a png/jpg to a cell phone via the socket and then show … |
The End.