32,199 Topics

Member Avatar for
Member Avatar for kyriacos1986

When I run the following lines of code the following erroe from the compiler is displayed [CODE]cannot find symbol - method start()[/CODE] CODE: [CODE]import java.lang.Thread; import java.util.concurrent.*; public class MyThread { public static final int MAX = 15; private String message; /** * Constructor with parameters * * @param message …

Member Avatar for forkmartin
0
136
Member Avatar for thanatos1

Hey guys, i've been spending some time writing a pokemon clone game in java and was wondering if anyone would like to help me out, it's quite a big project since i'm planning on making it much more than a simple clone, but if you'd like to perhaps help out …

0
115
Member Avatar for enterpise

i have programming assignment which is to make UDP and TCP client now i already finished UDP ,TCP client and GUI now i want to make the command line class So the assignment tell me that "CLIENT: The client should read input from the command line: • -x <number>, where …

Member Avatar for enterpise
0
199
Member Avatar for ThaiAmL

Hello! I'm studying right now as an exchange student in Germany and taking my first programming course in Java, and in the last week, things have just started to go over my head and I'm kind of drowning while trying to get all the homework done! The assignment was supposed …

Member Avatar for ThaiAmL
0
997
Member Avatar for VinC

I'm been working through my textbook and just can't seem to understand the section on covariant return types. ie) what are covariant return types, what they are used for, etc. The definition in the book is as follows. [QUOTE]An overridden method in a derived class can return a type derived …

Member Avatar for DavidKroukamp
0
156
Member Avatar for connect2abhi

Hi Can any one tell me how to call a subclass method from a superclass? For example: I have a class A,B and C. Now B and C extends A. So is there any way that we can call a method of B in A? Thanks Abhishek

Member Avatar for DavidKroukamp
0
12K
Member Avatar for enterpise

now i'm try to make the delete and successor method for BST in java[CODE]public void delete(BinarySearchTree<V> pointer) { // 1. The node is a leaf. // 2. The node has no left child. // 3. The node has no right child. // 4. The node has two children. BinarySearchTree<V> current …

Member Avatar for enterpise
0
155
Member Avatar for NIES
Member Avatar for sharathg.satya

hi all i am facing a problem with the below code i used keylistener so that when i click letter 'v' the program has to exit. But the following code is not working. Help me please.. i think we should add listener to the code but how to add listener …

Member Avatar for stultuske
0
182
Member Avatar for krejar

I think my issue is in line 18. The program runs just fine, but my answer isn't correct when I enter a radius and height. Not sure what I am doing wrong here. [CODE]import java.util.Scanner; import java.text.DecimalFormat; public class ConeA { public static void main (String[] args) { double surface; …

Member Avatar for krejar
0
186
Member Avatar for rahul.ch

A snippet: package com.deitel.jhtp7.ch14; public class AccountRecord { ..... Doubt: 1. What does the above package statement imply. As in how(path) this AccountRecord.java will be stored? As in what folder hierarchy should I create? 2. In Command prompt I have set my Current Directory as : E:\RDL\Dropbox\Coding\Core Java\File So will …

Member Avatar for DavidKroukamp
0
241
Member Avatar for mortanto

I wouldn't normally ask for help like this but im getting quite desperate. I really need help with a java assignment that I'm really struggling with (I haven't done any coding in over 2 years so lost just about any knowledge i had) the assignment needs to have a collection …

Member Avatar for StephNicolaou
0
150
Member Avatar for stay_alive

Well hello, i'm about to start my little app. The only task i want it to perform is a left mouse click on a button on the browser, IE, Firefox, Safari... I wonder if this can be done as the click will be performed outside the program window or frame. …

Member Avatar for peter_budo
0
2K
Member Avatar for rahul.ch

[code]public class StringBuilderConstructors { public static void main(String args[]) { StringBuilder sb3 = new StringBuilder("hello"); System.out.printf("buffer3 = %s\n", sb3.toString()); //written in textbook System.out.printf(sb3); //i tried System.out.println("buffer3=" + sb3); // i tried }} o/p: buffer3 = hello hello buffer3=hello[/code] doubt: The book says toString() gives the string representation an object. That …

Member Avatar for rahul.ch
0
236
Member Avatar for ab_omid

hi i want to use hibernate in java+postgresql but when i run it receive NullPointerException [code]import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import org.postgresql.Driver; public class FirstExample { public static void main(String[] args) { Session session = null; try{ SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); session =sessionFactory.openSession(); Transaction tx = …

Member Avatar for ab_omid
0
291
Member Avatar for torkolort

I'm creating a small java program that use some special graphics to draw a picture to a certain format. The program will be run as a jar file, and needs some graphics definitions as arguments at initiation. These definitions exist in a small C# class, and should contain only small …

Member Avatar for peter_budo
0
212
Member Avatar for Razer13

Hi, I have been trying to look for some code to add a comment box where people can add or delete comments in my program when viewing items any ideas pls?

Member Avatar for Razer13
0
202
Member Avatar for 47pirates

Hello guys i'm trying to send data to same socket at different times from different java classes. I can easily send the data from one class but after logging in when i try to send data to same socket from another java class ,there is an error. suggest me some …

Member Avatar for 47pirates
0
180
Member Avatar for mohamed moamen

i'm use Netbeans i create JframForm and add a panel to it ,and create new jpanel and add components to it like buttons & textboxs ,finally I'm add the panel 2 to panel 1 but the components of panel 2 not appear and their is no errors. "how i add …

Member Avatar for mohamed moamen
0
112
Member Avatar for ajacintha

Hi, I am working on a tool where the user on click of the button opens a URI, takes screen shot and copies the image in a word document and sends the report to list of users. Im now working on invoking a URI from Java application, I am successful …

Member Avatar for ajacintha
0
115
Member Avatar for MeandJava

Hello everybody, I'm trying to make a connection between my mobile and my pc. Im using J2me midp 2.0 to create my code. The jar of my mobile wants to make a connection to the bluetoothaddress of my pc. My mobilecode is based on a MIDlet. But everytime the connection …

0
189
Member Avatar for Eragah

[B]Hi i wanted to know how to implement a checking system so that whenever my program randomizes a horse it will always be unique. Thanks![/B] [ICODE]import java.util.Scanner; public class Horses { public static void main(String args[]) { String[][] horses = {{"Black ","White ","Gray ","Old ","Young ", "Pink ","Yellow ","Brown ","Orange …

Member Avatar for peter_budo
0
110
Member Avatar for hhheng

Newbie questions. I laid out the controls in shell by GridLayout(2, false). And when user click a checkbox, I wantto to hide one or several lines. I tried to set the exclude to true, and set the control in that line GridData(0, 0) to hide those lines. However there were …

0
87
Member Avatar for rotten69

G'day everyone, I'm doing at a tutorial on Oracle website and still following it so far. I have come across this formatter "%,8d" and can't seem to work out how it works. I know it's adding a coma to the integral number. The thing that I can get my head …

Member Avatar for rotten69
0
106
Member Avatar for moonstar3910

[CODE]import javax.swing.*; import javax.swing.border.*; import java.awt.*; public class ConnectFour { // the grid used for storing the game layout. private int[] [] grid; // the player whose turn it is. private int currentPlayer; public ConnectFour () { // create the grid grid = new int [7] [6]; // initialize the …

Member Avatar for roxin_phoenix
0
122
Member Avatar for ayanbizz

I am trying to implement huffman coding scheme in java.But I am facing problems in building the huffman tree.How to proceed ?Is there any datastructure in java that will help me to do it?Please help!!

Member Avatar for Ezzaral
0
421
Member Avatar for Daigan

Here's the code: [CODE]class SingleBoard extends JPanel { public SingleBoard (ActionListener e) { setLayout (new GridLayout (3, 3)); for (int i = 0 ; i <= 8 ; i++) { buttons [i] = new JButton (); buttons [i].addActionListener (e); add (buttons [i]); } } } public void init () { …

Member Avatar for Daigan
0
141
Member Avatar for Eragah

[B]In the Code below i have a program using multi dimensional arrays. I have a quick question on "How to" ad a checking system so my random class does not generate the same "type" of horse twice. For instance right now i have my program pick a random color with …

Member Avatar for stultuske
0
237
Member Avatar for riahc3

Hey Lets see if I can explain myself correctly...... I have 2 projects, one a program and another a library. First project is basically this, more or less (obviously it is more complicated) [code] //This is the main project //Inside com.stuct: //Global.java package com.stuct; public class Global { public static …

Member Avatar for riahc3
0
526
Member Avatar for Eragah

[B]For some reason whenever i print out the code below "System.out.println("Heat 1:"); never prints but rather somehow just leaves the terminal window. because when i use print instead of println it shows but not when i use println[/B] [CODE] System.out.println("Heat 1:"); System.out.println(heat1[0][0] +"\n"+ heat1[1][0] +"\n"+ heat1[2][0] +"\n"+ heat1[3][0] +"\n"+ heat1[4][0]+"\n"); …

Member Avatar for stultuske
0
190

The End.