32,204 Topics
| |
I need some help. I'm trying to create a number pad like a cellphone that captures user input by pressing buttons in a panel on the left and displaying what the user punches in the top panel. Then I have a clear button in the panel on the right to … | |
Okay, so what I am trying to do is pull user data from a phpBB forum site, basically just what a member's ID is, their "rank", join date, and the other information fields that are generally displayed on their account to the public. The problem is, the site is setup … | |
I dont understand how to do this, my teacher suxs at teaching. He's a smart guy, just a really dumb teacher.. Have you ever had one of those teachers? Its a pain. Anyways This is due before 12am tonight..Please Help me solve it::: Create a hangman program. Sample output from … | |
Hi guys i am having this exception [I][I]Initial SessionFactory creation failed.org.hibernate.MappingException: Foreign key (FKF5B10F06F8C1E633:detalle_pedidos [pedido_id])) must have same number of columns as the referenced primary key (pedidos [pedido_id,cliente_id,empleado_id]) Exception in thread "main" java.lang.ExceptionInInitializerError[/I][/I] according to this my table pedidos mismatch detalle_pedidos here pedidos pojo [CODE]import java.math.BigDecimal; import java.util.Date; import java.util.HashSet; … | |
Hi, I'm having an issue with the following directions: public static int aPower(int a) Given a number a > 1, Returns a number n such that for some m > 1 we have a = n ^ m. If no such n exists it returns 0 public static int aPowerOf2(int … | |
[CODE]import static java.lang.System.*; public class ShipTester { public static void main (String []args) { Ship s1 = new Ship(); s1.setX(3); s1.setY(10); s1.setSPeed(22); out.println(s1.getX()); out.println(s1.getY()); out.println(s1.getSpeed()); out.println(s1);//calls the ToString method Ship s2 = new Ship (3,10, 22); ship s3 = new Ship(5,7 ); s3.setSpeed(19); out.println(s1.equals(s2));//s2 becomes rhs out.println(s1.equals(s3));//s3 becomes rhs } … | |
| Hi, it is kind of a beginner's question... I'm trying to read user's input from keyboard. The user types in: a1 a2 a3 b1 b2 b3 c1 c2 c3 ... in which each line has three integers separated by a space. Every three integers are on the same line. [CODE]Scanner … |
it's my homework and i have no clue what i'm doing. i pay attention in class but i still don't know what's going on! it's a 2 part project, with a cointoss class and histogram class. this is my cointoss class [CODE]import java.util.Scanner; public class CoinToss { private static final … | |
hellow, i wondering will be able to draw a pi chart with diffrent scetions colored diffrently with out using Graphics2d class....in addition that i want to make it rotating 360 degree.:icon_neutral: | |
Hi all, I have a serious problem, I made a program in java that prints reports, I made and tested the reports with one printer, but when I used the program in another printer (and another pc) all the fields are printed around 5mm down of the normal position. I … | |
so we have a big project and i already did the cartesianproduct portion now i'm stuck on creating a venn diagram application that should ask for the user to enter specifications like labels dancing singing , etc. and then how many for each 23 students like dancing, 10 like singing … | |
I am a very new java student.I need to write a program ask the users to enter the series numbers separated by commas, with the valid input is : 23,45,90,4,5 The program should calculate and display the sume of all the numbers. I had written the code. I knew it … | |
[CODE] Film[] callFilms = new Film[100]; static int numberFilm = 0; [/CODE] [CODE] //Search Film Method public static void searchFilm(Film[] callFilms){ Scanner scan = new Scanner(System.in); int condition = JOptionPane.YES_OPTION; boolean check = true; do{ System.out.println(); System.out.println("Search Films"); System.out.println("============"); System.out.print("Please Key-in Item Code: "); String code = scan.nextLine(); for(int i … | |
Is it possible to create an array of functions in Java? Or is this not possible? | |
Hello all, I'm using the version 6 of Eclipse JAVA development. The code below is very basic, but I'm getting warnings which is probably preventing me from running the application. Any ideas? Basically what I'm designing is a program which would input the radius and therefore it would display the … | |
Dear all, When printing a grid, for example a chess board, I was hoping it wouldn't have the same output as the console. When I want the position to be grid[x][y] = 5, 5, it will place the counter in the bottom right corner in a 5x5 grid, (5,1) instead … | |
| |
I was writing a code for class as follows: [CODE]import java.util.Scanner; public class Salary2 { public static void main(String[] args) { Scanner input=new Scanner(System.in); String name; float salary; float hours; System.out.print("What is the employees name?"); name=input.nextLine(); while (!name.equals("stop")) { System.out.printf("What is %ss salary per hour?", name); salary=input.nextFloat(); System.out.printf("How many hours … | |
Hi all, I am having confusion on polymorphism 1)Is Method Overloading considered as polymorphism? 2)Is there two types of polymorphism(run time and compile time ) available? thanks in advance | |
Hi, I have this requirement that I have been trying to solve for a couple of days now. I have this source DB. The objective is to extract data from this source DB and insert into a oracle table. The meta data for both tables are the same (1-1 mapping). … | |
Hello, I've been trying to code a TrueSkill calculator using Java that fetches scores and updates them in a MySQL database. I finished coding it however it appears to have a problem while executing. This is an example of what I want the output to be like: [QUOTE]connecting to database … | |
film class [CODE] import java.util.Scanner; // Creating Class Members public class film { private String itemCode; private String title; private String description; private String language; private String runningTime; private String productionCompany; private String status; //eg, pending, premiering, running, written-off // No-argument Constructor: Without Parameters public film() { itemCode = ""; … | |
Hi, I'm making a snake game and I got a timer to check everything and repaint the component. How can I achieve a 60 fps without affecting the movement of the snake. I need help to come up with an equation for the speed of the snake. Need to change … | |
Hi there, I have to create a card game as an assignment, and i am having trouble with a part of the assignment. Basically, there is an array, 'playerHand', which holds a set of integers. What i want to do is to add the elements of the array and then … | |
Hey, I am now programming in a MacBook Pro and for the KeyCodes in the Robot Class, there is no set key for Command. Can I set a KeyCode to do the actions of the Command key? Thanks | |
Hi i am new to java gui, i have trouble using color constructor. please tell me what the problem . thank you . [CODE]import java.applet.*; import java.awt.*; public class AnAppletSubclass1c extends Applet { Color c = new Color(5,25,205); public void Color(int r,int g,int b); public void init() { System.err.println("Hello from … | |
I need help understanding this algorithm Design a variation of algorithm TreeSearch for performing the operation findAl(k) in an ordered dictionary implemented with a binary search tree T, and show that it runs in time O(h + s), where h is the height of T and s is the size … | |
Your task is to implement Stack and Queue classes for Objects. Both Stack and Queue should extend Collection, which is an abstract class that will be given to you. You will need to download and modify the NetBeans project that goes along with this assignment. Stack should have the following … | |
Write a java project (applet) that has two classes. The driver class (has the init() method) should allow the user to enter into an Input Dialog Box, the mail type ("P" for Priority or "F" for First Class), a blank space, and the weight in ounces of the piece of … | |
First of all, hello Im Joey and Ive recently started messing around with the Java language. Ill do my best not to bother you alot with my newbie questions :) So I need to create a method that returns some variables I have encapsulated, as String but without the last … |
The End.