32,199 Topics
| |
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 … | |
I've just started learning some Java, and now I've stumbled upon what may be my biggest enemy so far, Applets. To begin with, they are inconvenient to code and and test. You have to build them in the IDE, (Using Netbeans as of now) create an external HTML which can … | |
Hello Members, What is the largest integer that can be stored in Java? Thank you!! | |
hello every one this program compares loans with various interest rates [CODE] public static void main(String[] args) { Scanner input=new Scanner(System.in); //Prompt the user to enter the loan amount System.out.print("Enter the loan amount:"); int loanAmount=input.nextInt(); //Promp the user to enter the period in number of years System.out.print("Enter number of years:"); … | |
Im trying to make a breakout game. I cant seem get the score to show up, but I was able to get everything else working. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PongPanel extends JPanel implements ActionListener { private Paddle paddle = new Paddle(); private PongBall ball = new … | |
Hi everyone, I'm working in netbeans IDE 6.9 for my college project work. I had made my application in such a way that, using single Desktop Pane I used to add all the JInternal Frame to it, and display one by click on the respective menuitem. For e.g. for [B]MenuItem1[/B]: … |
The End.