32,199 Topics
| |
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 … | |
[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 … | |
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. | |
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 … | |
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 … | |
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. … | |
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 | |
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); … | |
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???? | |
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. … | |
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] | |
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. … | |
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? | |
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) … | |
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 … | |
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 … | |
[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? | |
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 !! | |
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 | |
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 … | |
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 … | |
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() … | |
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 … | |
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 … | |
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 | |
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; … | |
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 … | |
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; … | |
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 … |
The End.