32,199 Topics

Member Avatar for
Member Avatar for imclumsy

Hey guys, I am trying to read a skel file and create a skeleton from it, but I don't understand how to do the joint class. Here is what i have now: this is the main class. [code] public static void main(String[] args) { // Frame frame = new Frame("Simple …

Member Avatar for emilo35
0
162
Member Avatar for wheriz

[QUOTE=verruckt24;844577]To expand what JamesCherill says in one line, The Java Compiler would add a default constructor if you haven't defined it and if you haven't defined a parameterised constructor either. But the moment you declare and define a parameterised constructor (and then don't define a default constructor) Java assumes that …

Member Avatar for JamesCherrill
0
81
Member Avatar for Ron2794

hi all m not even able to run simplest hello program through java........it is giving a list of number of exceptions.i wrote following [QUOTE] public class hello{ public static void main(String args[]){ System.out.println("Hello"); } } [/QUOTE] Even the above is giving following exceptions classnotfound urlclassloader noclassdeffounderror loadclassinternal findclass etc.

Member Avatar for peter_budo
0
68
Member Avatar for anthony5557

Hey guys, I've been trying to set this up for a while now and I'm getting something funny I just can't figure out. I've installed the jdk 6. I've changes the path and classpath. But when I go to the cmd its not finding it anywhere. I've new to java …

Member Avatar for peter_budo
0
75
Member Avatar for purijatin

Iam unable to run programs from command prompt, my environment variables are correct. When i type javac on command prompt ,it gives the correct data ie possible outputs. When i type java it again responds as it should. But if i run a program say: java practice then it gives …

Member Avatar for peter_budo
0
270
Member Avatar for sneaky667

USING JAVA SWING I HAVE A JFRAME WITH TEXT FIELD WHICH I PASS THE USERNAME AS SOON AS I LOGIN. THE ISSUE I HAVE IS WHEN I NAVIGATE TO ANOTHER FRAME AND COME BACK AT A LATER TIME THE FIELD LOSES ITS VALUES I USED THE hide() and SETVISIBILE(TRUE) methods. …

Member Avatar for stultuske
0
36
Member Avatar for fsn812

Who here would prefer Java over PHP, or PHP over JAVA? If you prefer one over the other, for whatever reason or application, why? Specific code comparisons are appreciated

Member Avatar for mama_rock
0
527
Member Avatar for memo1

I need to converted from seconds to hours, minutes and seconds. (without using if) and this is my code [CODE]import java.util.Scanner; public class SecondToHoursAndMin { public static void main (String[]ages) { Scanner in = new Scanner (System.in); int second; System.out.println("Enter the second: "); second = in.nextInt(); int hours,minutes,second1; hours=(second/3600); minutes=(second%60); …

Member Avatar for armsracer
0
104
Member Avatar for kesh1000

hi all i need a bubble sort algorithm in Java and make a class bubble_sort to sort any given array of any user defined type. can any of u give me a basic algoruthm i need to work with????

Member Avatar for chaospie
0
233
Member Avatar for armsracer

I am making a calendar planner applet. When the user clicks on a date it displays a menu of the different activities that can be performed. Then when the user makes their decision for the activity the calendar is displayed again this time with an updated icon for that date. …

0
59
Member Avatar for mehak_soft
Member Avatar for Eman1

To accept 3 number and find max among three number(using && for checking multiple experssion) [COLOR="Red"]Please help me, I am a beginner in this discipline, and I hope I explain the problem[/COLOR]

Member Avatar for Katana24
-1
68
Member Avatar for Katana24

Hi, im trying to use an actionlistener attached to a button to add a component to a frame I have created. The actual button should add to the frame a circle with some text placed in it which I have already created, it works fine so there's no problems there. …

Member Avatar for Katana24
0
112
Member Avatar for Katana24

So i ve managed to create different shapes in my GUI window. But how would i go about deleting a certain shape or line from the window when I press delete on my GUI screen?

Member Avatar for Katana24
0
245
Member Avatar for jk8204

I need to design a class to represent an oven control unit containing: - Three constants (COOK, BOIL, SELF_CLEANING) with values of 1, 2, & 3. - Boolean value 'on' to represent oven is on or off - Int value for cooking temp, actual temp, and cook time (in min) …

Member Avatar for Katana24
0
120
Member Avatar for firebugg

Hi, I am getting an [COLOR="Red"]Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol[/COLOR] error message when I try to run this merge/sort program. I can't figure out how to fix the program to get rid of the error. Please help. [CODE] import java.util.Random; public class ArrayUtil …

Member Avatar for firebugg
0
2K
Member Avatar for Privoxy

So doing my first year of software engineering at Uni and am having a little trouble with the old Java, Basically I need to use the Calendar class to call todays date, and then store it in a variable, Iv stumbled upon this bit of code but don’t really understand …

Member Avatar for ~s.o.s~
0
108
Member Avatar for solomon_13000

[CODE]public class Testing { static void calculate(Integer... i) {} public static void main(String[] args) { calculate(12); } }[/CODE] What does the ... in the calculate method argument indicates?

Member Avatar for AndreiDMS
0
75
Member Avatar for shivnath

Hello everyone. I want any text string to be rendered as an image using java coding and saving that image as an image file. Plz help me if anyone have any idea. Thanks in Advance !!

Member Avatar for peter_budo
0
66
Member Avatar for danielagaba

hi i wanted to inquire about two things. First, is it possible to connect two phones that both possess wireless cards to each other without there necessarily an access point, if so how could i, in theory, use it to design a messaging application in J2ME. thanks

Member Avatar for peter_budo
0
92
Member Avatar for coderGh

My code is giving me problems can't add items to may stack Array Here is the code i have written public class MyStringArrayStack implements InterfaceStringCollection { public String[] stackArray = new String[0]; public int top; public int newSize; public boolean setMaxSize(int newSize) { if(newSize <= 0){ return false;} else{ top …

Member Avatar for coderGh
0
78
Member Avatar for rue64ja

Hello, I'm trying to write a method that resets a string to a default value (previously defined in a class) if the value inputted is not a valid. Because I know the format or structure of a valid input, I should easily be able to do this. The string is …

Member Avatar for javaAddict
0
73
Member Avatar for musikluver4

The code below is the file for the constructor method and the get methods [code] //Date: 3/18/2010 public class Taxpayer { private int socSec; private double yearlyGross; public Taxpayer(int taxPayer, double income) { socSec = taxPayer; yearlyGross = income; } public int getSocSec() { return socSec; } public double getYearlyGross() …

Member Avatar for javaAddict
0
175
Member Avatar for David22

Hi all. I am up to the final stage of my system, and it requires use of the observer/observable pattern, something I haven't a clue about! Basically, I now have a functioning "WatchList" system with which to store specific objects (Locations). Now, these objects have a number of fields relating …

Member Avatar for JamesCherrill
0
129
Member Avatar for saphireina

pls help me with this problem......its for my exam for finals...pls help me.... here are the instructions: Create a Class of the ff: (focus on payroll) 1. EmployeePay (parent) define: attribute: salary(net), gross, rate, no of hours worked, tax=20% constructor: (2) method: setters/getters, reset()-set number of hours work to 0 …

Member Avatar for saphireina
0
132
Member Avatar for Ron2794

hi all frnds m not able to use javac command in my command prompt the command prompt is saying that javac is not recognised as valid but i have installed java plz help how to solve the problem

Member Avatar for musthafa.aj
0
87
Member Avatar for bufospro

Hi, I am trying to write to a .txt file an integer but the characters I see when I open the file are strange. Could you tell me what happens ?? [CODE] import java.io.*; public class A { public static int readInt() { byte b[] = new byte[16]; String str; …

Member Avatar for bufospro
1
121
Member Avatar for gabz16

Please help me add actionlistener ect. to my puzzle program so that i can move the tiles into ascending order..Here is my code.. [code]import javax.swing.*; import java.awt.*; import java.util.Random; public class Rand { private JButton btn[]=new JButton[16]; public static void main(String args[]) { Rand app=new Rand(); } public Rand(){ JFrame …

Member Avatar for gabz16
0
229
Member Avatar for .11

Okay I am working on a quick Shortest Job first algorithm and ran into a problem. I can't figure a way to implement, each way I try I get the wrong next process. [CODE]private static int lowTIme(ArrayList<Process> testProcesss, int currTime) { int i; int temp = testProcesss.get(0).getcpuTime(); for(i = 1; …

Member Avatar for .11
0
152
Member Avatar for Hitman908

Im having trouble coming up with the java code for this. Can someone help me? First 3 month month-by-month account balance in your bank savings account. You need to make one, only one transaction-a deposit or a withdrawal-each month. Interest is added to the account at the beginning of each …

Member Avatar for masijade
0
218

The End.