32,204 Topics
| |
I would like the output to be JUST the TIME. Currently it also displays the date. How do i fix this. [code] <html> <head> <title> Start and stop a clock </title> </head> <body> <input type="text" size= "60" id="theclock" /> <script type="text/javascript"> var setIntervalID = window.setInterval("setClock()",1000); function setClock() { var now … | |
Hey Lifesavers! How can i dispose the current frame holding the combobox on item selection to navigate to the next frame. The dispose(); method does not dispose the Main class, when i select supplier item onthe combo list. how can i reolve this; sample code from the sodes is below. … | |
How do I make my array legal? It doesn't seem to like my style here. [CODE]import java.util.Scanner; public class solveQuadratic { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner (System.in); double[] eqn = new double[2]; double[] roots … | |
Im trying to do this code to create a Parking ticket Simulator. This is the code. public class Parking_Ticket { private String make; private String model; private String color; private String licenseNumber; public int minutes; public class ParkedCar { private String make; private String model; private String color; private String … | |
The code for the Towers of Hanoi is here, the problem is what will the rest of the recursive calls be? [CODE] //provided in the main method that String Src="Src", Aux="Aux", Dst="Dst"; public static void solve (int diskNumber, String Src, String Aux, String Dst) { if (diskNumber ==0) return; else … | |
The program I'm supposed to make a program where one thread starts three other threads. The original thread is going to wait until the three other has finished running and then the first thread can stop. The way I've built the program the three threads is started from one class, … | |
Probably easiest if I just quote, [QUOTE]5) Assignment Entity, A class that models an association between an Employee and a Project Each project usually has several employees working on it at any one time, but there may be none at times. Each employee must work on at least one project, … | |
Hey guys, I need to create a software which can read a barcode and I should be able to enter the value obtained from it into a database and also I need to compare them with certain values. I am comfortable working in java and would like to know how … | |
From what I gather as a Java beginner, when accessing instance members, the "this" keyword may apparently be used. see this program, [CODE]class sphere{ static final double PI=3.142; static int count=0; double radius,xcentre,ycentre,zcentre; sphere(){ xcentre=0.0; ycentre=0.0; zcentre=0.0; radius=1.0; count++; } sphere(double xcentre,double ycentre,double zcentre){ this(); // what does this mean … | |
Setter getter ..? what is this and what it does ? i searched over google but didn't find the suitable answer...! | |
Hai To All i want to create a siftware using java pls help me to create software thx k.santhanakrishnan SNIP | |
im getting an error while trying to print array contacts[i], why? any help? Thanks! :) this is my class Address where im gettingthe error: [CODE]import java.io.*; import java.util.*; public class Address{ //Declare variables String first; String last; String homeadd; String homeph; String cellnum; Scanner sc = new Scanner(System.in); public Address(String … | |
Hi all I have a gantt chart which i draw with JFreeChart. I want to add to this grpah a line that shows the current date. Does any 1 knows how to do it? Here is the code that i've written: [code] /* * To change this template, choose Tools … | |
Hi friends, which are the JAVA API's available for to connect your application with LinkedIn. | |
Hi there, I just wanted to find out if one can have a actionListener() in one .class file and then have the actionEvent() in another .class file? If not, how would I go about to get the same effect? Thanks! | |
Our teacher really sux, he just wrote this down on the board but didn't explain the program :(...after a lot of search i finally understand what is try and catch but what is the meaning of [iCODE]byte b=new byte[255];[/iCODE] in this program ? and why the program is not working … | |
I see so many examples everywhere and none of them helped me fix these problems, so if anyone can help me I would greatly appreciate it. I have explained my errors in the red Highlighted sections in comment form.... [CODE] package lab41thestockclass; class ParkedCar { private String make; private String … | |
Hi there, I have this kind of sample table. [CODE] Name Math Science English ------------------------------- Ben 86 88 80 Peter 80 79 83 John 84 90 86 [/CODE] I want to save this result, dynamically, in a "table" in Java. I want it to have a sorting function. Some of … | |
Write a program to enter a score and a points possible for a test, computer the percent, display the percent to 1 decimal place and then display the letter grade (A – F) using a standard scale (90, 80, 70, 60) – use the if ... else if ... else … | |
[CODE]<s:iterator value="listObject"> <s:component template="abc.vm"> <s:param name="text" value="listKey" /> <s:param name="prefix" value="listIndex" /> </s:component> </s:iterator>[/CODE] listKey is keys in a list. i am using iterator to traverse the list. i want to put here internationalization concept.so that when i write key of list then it find its associated values in a … | |
2. Create a class Reals for performing integer arithmetic on real numbers. Each real number has a whole part and a decimal part; your class should contain data components representing both parts as integers and should contain methods to do the following: a. Default constructor b. set the two components … | |
Anyone can to help me solve my java problem? I want 2 shapes to move at the same time when mouse dragged occurs. For example 2 objects name hat and face are created then when I mouseDragged face both face and hat will move together, but when I dragged hat … | |
hey im just having a bit of a problem on reading input from a text file. I know that it is probably something simple but I keep overthinking it. Here is what I am trying to do: I'm trying to read in a line of text that contains musical notes. … | |
Hi, I have write the code to upload a file to database. I checked it by uploading a text document which is in my desktop and it is working and successfully uploaded to database. [CODE]File tomcat.txt has been uploaded and inserted into Database.[/CODE] But when I tried to upload an … | |
Hi all, I have the following problem: My server sends the string str="1 2 4 dds \n" continuously to a C++ client.Here is the java code of the server: [CODE] private class SendingThread implements Runnable{ public Socket s; public DataOutputStream oo; public ObjectInputStream oi; ////private QueryTransferObject q; boolean connected; public … | |
Hi, I'm a beginner in the J2EE field. I've already learnt the basics of Java programming and now I'm moving on to web development. What I want to know is if I could skip learning JSP/JSF, servlets, EJB, JPA etc if I learn Wicket, Spring and Hibernate. I'm still not … | |
I'm writing a program that will ask the user for input and then store it into an array until called to the output screen. here is an example of my code so far. I have no idea how to get the input to store in the array. import java.util.Scanner; public … | |
new to ArrayList and was wondering what I am doing wrong. I keep getting a null pointer exception when trying to addRecord... [CODE] import java.util.*; public class StudentDB { private List<String> studentDB; public StudentDB(String db) { List<String> studentDB = new ArrayList <String>(); studentDB.add(""); } public void addRecord(String recordAdd) { studentDB.add(recordAdd); … | |
I've coded this program but i am getting this error, EmployeeeMain.java:57: non-static method getdata() cannot be referenced from a s tatic context Manager.getdata(); ^ 1 error I've used the same technique in other program , it is working fine but this program is not working !! Why I am getting … | |
I have been incurring errors during compile, in which I cannot seem to figure out where the problem relies. I have a class file which is different from the java file. When running the java file im recieving the error of cannot find symbol. {note both of the files are … |
The End.