32,199 Topics
| |
I need a user to input int and get the name of the month in return. I have this: [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package se211.dz14; import java.text.DateFormatSymbols; import java.util.Scanner; /** * * @author Boris */ … | |
Hello I'm tring to declare a BinaryOut type of object in a Java web project but it doesn't seem to work. I've imported the same libraries I used in a standard Java project so I don't know what's wrong. Any tips???? | |
I have a static class, with all methods and fields static. My methods in that class are going to use a static field declared in that class. I want that static variable(which can not be made final) to be initialized with a value taken from a database when that static … | |
Is there a simple way to get a list/array of all the predefined colors? (without listing them all individually) ? It seems as though the colors are properties of the class "Color" rather than an enumeration. | |
I have a kind of doubt, suppose I have a class like this: [CODE] public class AA{ public static createUser(String a, int b){ User usr=new User(a,b); BB.storeUser(usr); } } [/CODE] Now, if multiple threads call this createUser() method of this class at the same time, will it cause any kind … | |
HI im a student and our professor asked us to convert a number into word: example: input= "1" output="one" i need to have numbers from 1-10,001 so my program will end up very long if i only use if else statement i know that there are other methods other than … | |
Hi folk. Can I use join() method in implementation of run(), like this: [CODE] public class MyThread extends Thread { @Override public void run() { int timeout = 30000; // here is some heavy work join(timeout); } } [/CODE] Is above thread terminated after timeout milliseconds if task takes longer … | |
I'm making a calculator program but I'm stuck somewhere. I'm still new to J2ME. So guys, please take it easy on me. :). I've been trying to find the error for 4 hours now. I think the problem is, x won't retain the value.. anyway, here's the full code. [code="java"] … | |
Hi all when I run commend : "C:\LJava\project\KTest2>java -cp .;org.freixas.jcalendar;.\build components.KTest2" my code runs well I then made a jar file with the command "C:\LJava\project\KTest2>jar -cf KTest2.jar .\build\components\*.class" my MANIFEST.MF 's content is : Manifest-Version: 1.0 Created-By: 1.7.0 (Oracle Corporation) Main-Class: components.KTest2 but when I run command "C:\LJava\project\KTest2>java -jar KTest2.jar" … | |
I want to create a JFrame and add panel to it ,the problem in drawing line in this panel [ICODE] package panel; import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JPanel; public class Main { public static void main(String[] args) { JFrame window = new JFrame(); window.setSize(200, 200); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Graphics g =null ; … | |
Hi everyone. I am currently working on a small project, where I have to interface an ERP (OpenERP) with another system (SugarCRM). For that, I am going to make use of the middle-ware Mule ESB, and to retrieve the ERP data, I will make use of a Java EE 6 … | |
Hey guys, I'm making a little pokemon game in java and i've come across a problem. The basic algorithm i use for movement is as follows: - if the player has pressed a particular key set the speed(float) accordingly (if key stroke was up, X speed should drop (since i'm … | |
can any one help me wright the code for any simple java games, choose one from the selection below plsss (using jav -Base Conversions -Lotto 649 -Mastermind -Hangman -Deal or no -Deal -Who Wants to be a Millionaire -Card Games -Theatre Seating -Morse Code Instant/Fortune Teller -Pay Stubs -Educational Game … | |
Hello, I'm hoping you guys can help. I have a double linked list, and i am trying to add a bubble sort to it,I am really new to java, I've been able to do a bubble sort with great easy whilst using binary trees, but now i'm using a double … | |
Alright, so basically I have this program going, it reads the text file perfectly, I also have some arrays created. Now I need it to store each team's rebounds, assists, and points separately. From there I need to get the mean, median, mode for each section (which will be completed … | |
Hi, this is my first post here, and I really need some help with my homework. I'm a newbie to Java programming, and I have this assignment: [I]Write an application which reads data from a file about certain items (one row - one item, stored are the integer valued code, … | |
Is there any way to extend gaps between jmenuitem? | |
Hi everybody I'm trying to write such a code: [CODE] import pps.PPSFrame; public class X extends PPSFrame{ ..... } [/CODE] Of course there's no such pps package in java. Where can i find it ? or at least PPSFrame.class ? Regards, | |
I am fairly new to java and I have a program that I really need to get working. I need to pass 'alarmId' from class A to class B. I am not too sure how to go about this, any help would be greatly appreciated. [CODE] public void onStart() { … | |
Hi all there, I was reading a book on Java and came across this piece of code. Now, I am not sure how line 13 works especially, these symbols after the equal signs "passed=%d; failed=%d%n" . How do the symbols affect the output of the variables(passed & failed)? so let's … | |
I'm trying to make a cllient-server chat that only needs to be able to handle 1 connection. First, I have a data-type question: 1. At the moment I am using this code to get messages [CODE] BufferedReader ins = new BufferedReader(new InputStreamReader(sock.getInputStream()));[/CODE] And this code to send messages [CODE] PrintStream … | |
So here it is, this is my new problem, we were assigned to create a simple ATM Machine: Automatic Teller Machine [B] Balance Machine [D] Deposit [W] Withdrawal [Q] Quit Select you option: (input letter here) when i choose balance this window should pop out: Your Balance is 0.00 OK … | |
How print this series in while loop square root 1 2 4 8 16 32 64 128.......... and cube root 2 8 24 72........ | |
I'm trying to take a text file with 20x15 numbers(or characters, doesn't matter) into a 2d array. I just can't seem to get it to work. Can you help me fix it? Thanks [CODE]FileInputStream fis = new FileInputStream("MapFile.txt"); while (fis.available() > 0) { for (int x = 0; x < … | |
Hello all, I am trying to make a program that essentially takes a string of parenthesis and outputs whether or not its balanced. Basically, every '(' will push the index of that location of the string on to the stack, while a ')' will pop it off if it's not … | |
Interface: [CODE]import java.awt.Rectangle; public interface Doubler { public void makeDouble(Rectangle newRectangle); }[/CODE] [CODE]import java.awt.Rectangle; public class RectangleDoubler implements Doubler { private double x, y, width, height; RectangleDoubler() { x = 0.0; y = 0.0; width = 0.0; height = 0.0; }//end of default constructor public void makeDouble(Rectangle newRectangle) { x … | |
Hello friends is there any keylogger scripts thats I putt into my home page when user visit it it make a log file of users key storks and send it in the mail or upload in the script form | |
When I try to put the JTextArea in a JScrollPane, it a) doesn't display the menu most of the time, and b) doesn't display the scroll bars, even though I've got more text than the size of the JTextArea. Code (it's a VERY simple error console for something else): [CODE]import … | |
Hi I have a small problem with with my bubble sort. Everything else in my program works fine if I remove my bubble sort. This is the part of code for the bubble sort. [CODE] //bubble sort based on animal breed if (numberofanimals > 1)//making sure there is more than … | |
I am working on a java program that will count a particular letter in a sentence that the user inputs. Below is the code that I have, but I also want the program to output the sentenced that was typed by the users. Any help would be appreciated. import java.util.Scanner; … |
The End.