32,199 Topics
| |
Hi guys, so I have this project where the requirements are as follows. Create a class called Car, which serves to represent a particular vehicle at a car dealership. Consider that each car has the following properties, entered by the user (all value ranges should be error checked): Sticker price … | |
I'm making a game and when it starts up I want the game to load a file in it's jar and set the display according to the contents of that file, I can do that just fine. But if the file doesn't exist(the first time the program runs) or something … | |
hello Can u help me ? write an java program that outputs the following pattern. The program shuold prompt the user an odd number of lines (limit 1 to 11) . For example, if the user prompt the number of the lines is 9, then the output should be: + … | |
Hi, I'm having a rather strange problem with the Java compiler. I'm trying to compile a simple hello world program and I can compile it perfectly within NetBean but when I try to use the commandline javac command I get a error. The error says the there is something wrong … | |
i would like to know what are the functional requirements of such a system as i am planning to build one. this has to be as simple as possible. please help. Thank you | |
There is any java Language Translation API. If so means, please indicate that API. | |
welcome .... I'm starting learn java langauge , it is very intresting langauge .... I have this problem and I need your help... (( [COLOR="Green"]Write a java applet that will animate an analogue clock. The clock should look like the one shown in Figure 1. The background color of the … | |
[COLOR="Red"]please can some one soluation this programmm???? i need tomrrow[/COLOR] Your task is to implement a program that displays the calendar for a specific month in the Hijri year. The program prompts for the month number and the first day of the week for the given month. For example, if … | |
). Design and implement an application that plays the Rock-Paper-Scissors game against the computer. When played between two people, each person picks one of three options (usually shown by a hand gesture) at the same time, and a winner is determined. In the game, Rock beats Scissors, Scissors beats Paper, … | |
I am trying to create file using RMS. I couldn't use List Command to create a file using RMS. Can you suggest easier way to create a file using List. [code=java] import javax.microedition.midlet.*; import javax.microedition.rms.*; import javax.microedition.lcdui.*; public class RmsNormal extends MIDlet implements CommandListener { private Display disp; private Command … | |
| Hi all, I'm a newbie for SWT, all was fine until now. I got a simple app with some buttons and text fields. I'd like to update the text field with incoming messages and show it to the user. [code] Display display = new Display(); Shell shell = new Shell(display); … |
[code] public void init() { // Assign values to the rectanagle coordinates. // Add the MouseListener to your applet } public void paint(Graphics g) { // Rectangle's color g.setColor(Color.green); g.fillRect(rect1xco,rect1yco,rect1width,rect1height); g.setColor(Color.red); // When the user clicks this will show the coordinates of the click // at the place of the … | |
can some one help in this code because their is two error in my code. need reply ASAP. please. [CODE] import java.util.*; public class Card { private int point; public Card() { Random r = new Random(); //2-10 point = r.nextInt(10); while(point<2) { point = r.nextInt(10); } public void setPoint(int … | |
I am writing a simple program that is supposed to take a user input and convert it to char and for each char it should change it to the designated change. I'm using switch statements to do this. Ex. blue b = bravo l = llama u = union e … | |
Could anyone pls help out with the logic of codes that uses Choice menu. The choice buttons were created with its items(3 in this case) I have another sets of 9 buttons in an array Each button,when pressed gets a corresponding value from an array of integers defined elsewhere The … | |
Hi all, Can some please have a look at the codes below and tell how I can make the switch statement accept the value from the variable named answer. I think the switch statement only accepts certain data type but I don't know to make this work. Please help me … | |
[code] import java.io.*; import java.sql.*; import java.net.*; public class sqlDemo { int eno; ResultSet rs; ResultSetMetaData md; String /*insq,*/ selq; Statement stmt; public sqlDemo() { try { Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); Connection con=DriverManager.getConnection("jdbc:microsoft:sqlserver; DatabaseName= Admin.sdf", "sa", "deepa#247"); //BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); //System.out.println("Enter Employee id"); //eno=Integer.parseInt(br.readLine()); stmt=con.createStatement(); selq="select * from emp"; //insq="insert into emp … | |
i have a project from my college to be completed this weekend ... The project is to accessing the Vm's using java Program..... I know java std.Functions only not a high level... pls anyone know the steps how to solve pls explain me...... Thank u in Advance;;;;;;;;; | |
Hey, getting a new error in my code... Its almost done, cant figure out what is wrong with this. ERROR: non-static method isPrime(int) cannot be referenced from a static context [CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int x){ int divisor = 1; do{ divisor += 1; } … | |
[CODE] for(Iterator it2 = tries.iterator();it2.hasNext();) { tobedeleted2 = (FpiRightTree) it2.next(); tobedeleted2.setIndex(f); f = f+1; }[/CODE] I want to that in thread function.can someone give me help in creating thread? Tries is global. so in all threads it will be shared. i want to call thread. to do a for loop … | |
The program runs perfectly, however I am having an issue adding a discounted price. Another thing I noticed when I run the program is that the switch statement doesn't calculate the discounts at all. [CODE]// DiscountPrices.java - This program calculates total cost for discounted items. // Input: Interactive. // Output: … | |
please help me, how to read large amount of data in java like 5gb or more than that, if you know please reply me soon................ | |
Hello! I am doing an assignment for one of my classes and there seems to be something wrong with my code. It's supposed to allow the user to input a string and it will perform the linear search on the first array and binary search on the second array and … | |
I have a file which is already written till some lines. I have a blank line at the start of the file and I want to write in that line using Java. I thought creating a FileWriter object by using FileWriter(filename, true) and then a BufferedWriter object will start writing … | |
[code] public static void displayBoard(final char[][] theBoard) { // note the final parameter - we won't change the board, just print it. // Need to format the board display to look like this: // | | // ----- // | | // ----- // | | System.out.println("Welcome to a game … | |
Okay so i am started a project for a java class of mine, i would like to make the game simon, you know where there are four different colored buttons and it plays random sequences and you have to repeat them. I was thinking of using the random function, but … | |
Hi, I need some help with a school project. This is what I have done so far: (Sorry about the wall of code) [code=java] public abstract class State { private double drinkPrice; private double amountPutIn; private String selection; public State() { } public State(double drinkPrice, double amountPutIn, String selection) { … | |
Hi, I have a variable of type Object, which is obtained from an xml-rpc call like: [CODE] Object[] params = new Object[]{new Double(4.0), new Double(5.0)}; Object result = client.execute( "foobar.add", params ); [/CODE] and I know that it contains this xml data: [CODE] <methodResponse> <params> <param> <value><struct> <member><name>value1</name> <value><double>4.2</double></value> </member> … | |
I am sorry if this question is really basic. I was creating a Web Service which sets a watch on a database trigger. And when the trigger fires, I get an email. I couldnt find anything which would help me send an email directly from MYSQL using some kind of … | |
I am doing a project on "performing automated testing on open office tools" (Open Office bcoz -being open source ,its source code is available for testing & its modifiable too). I m either to use an already existing tool : winrunner or QTP, to generate and check test cases or … |
The End.