32,204 Topics
| |
Suppose I have four classes in a package named T namely Main, A, B and C The class Main contains public methods which the classes outside package T access and Main class in turn communicate with other three classes and let some function to happen. Now I want only a … | |
hi, my arraylistS in a covering arraylist behave like the same instance. i manupulate one of them with [CODE]i=0; manupulate(myarrofarrs.get(i));[/CODE], and all the sub arraylists have become effected of the manupulation. i googled a little but in google it was said: "create new instance with myvar=new myobject()" i have already … | |
HI, I need some help on using the math.pow() function to solve the following problem: a^n = p(1+ r)^n how would I translate it using math.pow() Thanks for your suggestions and any help! | |
I created the following package AccBal. [CODE]package AccBal; public class AccountBalance { private String Name; private double Balance; public void setData(String name, double balance) { Name=name; Balance=balance; } public void displayBalance() { System.out.println("The Account Balance of " + Name + " is $"+Balance); } } [/CODE] Then I created a … | |
Hello friends, I am having a small problem, i have already designed a chat application, the chat works fine over a local network but now I want to use it over the internet. Logically the program should but what happened is that to get the IP I have used [code] … | |
Hey everyone, I am having a small problem with sorting objects. I have a method called organizeTank. It should sort the fish in the tank such that: (1) all dead fish come first sorted according to size in descending order, (2) all live fish come next such that herbivores come … | |
Hi everyone, I am new to java enterprise edition and used Eclipse previously. I need to integrate apache maven with my eclipse. I saw a few tutorials like the one [url]http://www.eclipse.org/m2e/[/url] , and i tried to follow it but i could find the other option in the import dialogue. I … | |
hey there, I have this java 3D home assignment I need help with. I would greatly appreciate it if someone could direct me to a solution. I need to build create a 3 D digital clock and add some key navigation to it. I managed to add the key navigation … | |
Hello, i tried to hack my USB MODEM so that i have unlimited INTERNET connection but i failed, any one having an idea on how to do it? | |
Hello can you help me please... can you help me how can i retrieve the data from my database ms access i want to display this in the table...is it possible to use the JTable or not?...please help me thank you in avdvance and i am hoping for your positive … | |
i am a new programmer trying to make a program, which askes the user for a string input and searchs for the string in an array, and prints "Found: ("string") and the position of the string in the array. this is what i have done soo far: [code]import java.util.Scanner; public … | |
hi,i am using haxws to build webservice in java that returns an object not a primitive type.when return primitive type every thing is going well, the error that i am receiving is: [ERROR] javax.xml.bind.JAXBException: class endpoint.data nor any of its super class is known to this context. org.apache.axis2.AxisFault: javax.xml.bind.JAXBException: class … | |
when i run my project in java. i keep getting this stuff. No Console ..... I dont know how to get console in eclipse. here is my code. [code] import java.io.*; public class WordGame { public WordGame() { } public static void main (String args[]) { String WordGuess; WordJudge gm … | |
first of all, thanks for the suggestions lately where im asking to avoid flicking of the ball.. now its working smoothly :)) but i want now to add some more balls.. like 2 - 3 balls.. how can i do that ? i dont have an idea.. thanks guys.. | |
I have counter increase by one every once (round in loop) when the counter equal 100 am need it to go back and count down from 100 to 0, how i can make counter count down again ? [CODE]int i = 0; if(i<=100) {i-- ;) // that false else {i++ … | |
Hey, Is there any code that will hide the icons on my desktop? Thanks in advance | |
whats the advantage of implementing runnable over extending thread | |
Hi.. I have a query regarding accessibility of top level class from member inner class. I have just read the reason why local or anonymous inner classes can access only final variables.The reason being JVM handles these two classes as entirely different classes and so, if value of variable in … | |
[CODE]class A{ void method(){ System.out.println("Hello world"); } } class B{ void myMethod(){ A.method(); } }[/CODE] Can anyone tell me why I am getting this error.( non-static method method() cannot be referenced from a static context).Reffering context is not static.:?: | |
I read some of the threads on calculators, but couldn't find anything related with what I need. We have this swing calculator project, that uses buttons and/or a textbox for input, and a different textbox for output. I have done most of it, and is working ok. The problem I … | |
I have just started out with Java. I have been programing with C and C++ for some years now. I have this problem. Im not able to call a non static method belonging to the main class from the static main method. This is the code: [CODE]public class Helloworld { … | |
| Hey guys, Here's the problem I have: I am writing a server application in Java using the ServerSocket and Socket classes. I have an instance of ServerSocket which listens for connection and accepts them. The server runs a website that requires users to log in using an e-mail and a … |
OK I have a project due tonight at midnight and I know I should have posted sooner but it seemed like such simple things that I just knew I could do it on my own. I was wrong. I need your help. I have a program that essentially makes a … | |
I'm receiving the following errors when trying to read from a file: java.io.FileNotFoundException: rates.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at java.util.Scanner.<init>(Scanner.java:636) at MortgageCalculator4.submitButtonActionPerformed(MortgageCalculator4.java:187) at MortgageCalculator4.access$000(MortgageCalculator4.java:20) at MortgageCalculator4$1.actionPerformed(MortgageCalculator4.java:70) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6288) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6053) … | |
hey there again, I am trying to build a small mechanism that lets me store product names and prices on a produktet.txt file. the file should hold lines as follows: product1 price1 product2 price2 . . productN priceN So, I built a small panel with three rows and one column. … | |
Hi Everyone, So I just finished writing a program from my Java class,except I can't figure out how to validate the bookID. "In the Book class, you need to provide a validate method that validate weather the book id is correct. The book id should be a [B]string[/B], which contains … | |
I have been recently working on a java project to just practice java and work on making programs for fun, but i came up upon this bug: When i use Thread.sleep on my java program, it doesent execute the line above the try-catch block where i have my Thread.sleep. heres … | |
How would I get a box to appear when I hover over a JLabel? The box is to explain what the label is. This is just a minor detail for the user-interface functionality of a game. So when a user hovers over a label, a box appears explaining it. | |
Hi Can someone please let me know which classes, objects, etc I should use into to convert an image file (.png, probably) to a printable string in Java? The image will be around 100px square and I presume I could scan 1px lines into arrays, etc? I'm hoping Java has … | |
I was planning to start with a java speech program and went on with some research across the internet. I found that for any such program I need an API called the java Speech API. However when I wrote down import java.speech it showed no existence of any such API. … |
The End.