32,204 Topics

Member Avatar for
Member Avatar for fmasroor

when I run eclipse (just downloaded the 32 bit version from the website) it gives an error dialog that says 'a java runtime enviroment or java development kit just be available in order to run Eclipse. No java virtual machine was found after searching the following locations: " and it …

Member Avatar for JamesCherrill
0
240
Member Avatar for Violet_82

HI all, I am trying to validate the input in my tic-tac-toe program. I had a good look around on the net and tried a few combinations, but I couldn't get anywhere. Some people seem to be using methods like hasNextInt(), some other a try and catch statement. I tried …

Member Avatar for Violet_82
0
321
Member Avatar for sparob

So I have to make a java program that lets you enter test scores and then displays the test scores back to you showing the number of A's, B's' C's, 'D's F's entered based on the numbers put into the program. The program is supposed to end when you enter …

Member Avatar for sparob
0
193
Member Avatar for bibiki

hey there, I have created this simple app that makes use of a Robot instance. It is a network app that I control using telnet. I have tried it in two different computers. It works fine. However, in one of my computers, I manage to start my robot app through …

Member Avatar for bibiki
0
136
Member Avatar for jspence29

I am making a program that does synthetic division, except for it is not showing the quotient only the remainder. I have checked my for loops so many times, and I can't understant what is happening here is my code: import java.util.*; import java.lang.*; class synthetic { static Scanner userInput …

0
303
Member Avatar for bdl365_1

How do i pass file name ("chosenFileName") from sample2 class to sample1 class? An example would be nice. here's some code from sample 2 class - private void openFile( ) { JFileChooser chooser; int status; chooser = new JFileChooser( ); status = chooser.showOpenDialog(null); if (status == JFileChooser.APPROVE_OPTION) readSource(chooser.getSelectedFile()); else JOptionPane.showMessageDialog(null, …

Member Avatar for stultuske
0
112
Member Avatar for ismail.eyiowuawi

I have two textfields which are formatted for dates, i want to retrieve data from the database within a period of days which the two textfields stand for the "from" and "to" dates.Can anybody help me out? select distinct courseId,courseName,description,Date,amount from course where date>='2013/05/11' and date<='2013/05/11' for the SQL queries …

Member Avatar for stultuske
0
280
Member Avatar for bdl365_1

Let me start by saying I'm a noob. I want to get input from a text file through gui and perform some actions.the last time I did it I used command line argument to pass file name to get file input. The code in quote. It works when I uncomment …

Member Avatar for bdl365_1
0
413
Member Avatar for game06

I am trying to create breakout game like this below. http://www.2dplay.com/break-out/break-out-play.htm I like how when balls bounces on paddle you have control over where it is goings. i need help creating some thing like this //this is my code for when ball touch the paddle(player). i have divide the paddle …

Member Avatar for nandosss
0
176
Member Avatar for greystreet34

Hi, I'm working on an assignment for programming class where we're supposed to create a method that takes the contents from a text file (one giant string) and stores them piece by piece in a linked list. I'm a little stuck and not sure where to go from here, or …

Member Avatar for nandosss
0
4K
Member Avatar for Varunkrishna

When I was going through a program of my friends, suddenly I came across a strange for loop, I was wondering about the for loop since then, the loop looked like this for(1=0,ii=result.length;i<ii;i++) Is this for loop a valid for loop? Can any one please help me?

Member Avatar for JamesCherrill
0
222
Member Avatar for setu basak

package com.example.crypton; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts; import android.provider.Contacts.People; import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.Data; import android.telephony.SmsManager; import android.util.Log; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import android.app.PendingIntent; public class CREATEMESSAGE extends …

Member Avatar for setu basak
-1
253
Member Avatar for nishad_forums

Hello, I trying to create a **messenger**(just for practice, so nothing fancy!). I created the server and client programs. Suppose a client(user A) initiated a connection with the server, so it's online. Now, another user(user B) wants to chat with that user(A). How do I give User B the IP …

Member Avatar for nishad_forums
0
917
Member Avatar for siblers

Hello, I'm having a bit of trouble with this error. The error seems to be wih setRented but I'm not really sure what to change. This is my interface public interface Rentable{ double getRent(); void setRent (double rent); boolean isRented(); void setRented (boolean rented); } This is my abstract class …

Member Avatar for JamesCherrill
0
180
Member Avatar for setu basak
Member Avatar for harshInITworld

Hi, I am currently working on project wherein I am inserting thousands of records in database using spring batch. So is there any way where I can handle exceptions in my ItemReader and ItemWriter? I need to apply logic for failure of records when job executes i.e if I am …

Member Avatar for JamesCherrill
0
4K
Member Avatar for henrydmainguy

write in java language,to find the maximum,minimum andmean value of asset of floating point numbers to be supplied by the programmer user

Member Avatar for JamesCherrill
0
103
Member Avatar for parkz16

there are no visible error in the syntax but when i run the application i keep getting the following error. i have been trying to fix it for hours and simply cant find the problem. the error that appears when running is; Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.JComboBox.setModel(JComboBox.java:292) at …

Member Avatar for bguild
0
33K
Member Avatar for cisumma

My programs objective is to mkdir and ope dir. if I ever get it jarred up I would like to run it from a jump drive. [code] public static final String USERHOMEDIR = System.getProperty("user.home", "."); [/code] clearly this code will not be valid any more. Could this USERHOMEDIR be replaced …

Member Avatar for cisumma
0
551
Member Avatar for Neon Tetras

I'm working on a Grade Point Average Calculator. The user just have to Select the number of courses offered, then select the grade obtain in the different courses by choosing the appropriate grade from the Choice Box. The problem with my application is that, if the user mistakenly selects "A" …

Member Avatar for Neon Tetras
1
164
Member Avatar for sk8ergirl

hi, how can I make the size of the array is equal to the number of elements in the array

Member Avatar for JamesCherrill
0
262
Member Avatar for aadarsh_khare

Could anyone help me in understanding what does below Python code do? Also please help me in converting it into Java. import random howMany = random.randint(0,1000) stats = {} for i in range(howMany): value = random.randint(0,500) stats.setdefault(value,0) stats[value]+=1 for item in stats: if stats[item] > 1: print item

Member Avatar for JasonHippy
-1
273
Member Avatar for firdousahmad

Asalam U alikum I want to learn Java programming I have installed the jdk7 on my machine and i want to set the environment variables as it shows me that javac is not the internel or externel command.So can anybody help me

Member Avatar for JamesCherrill
0
76
Member Avatar for glao

Hello , I have a List<String> and I want to compare in a loop the elements. For example sth like : for (int i=0;i<theList.size();i++){ while (theList.get(i).equals(theList.get(i+1))) ... } I want to compare the next to the previous entry. Thanks

Member Avatar for glao
0
140
Member Avatar for sushants
Member Avatar for stultuske
0
104
Member Avatar for zxz

Hi everyone , i hope someone helps me out. im working my way up step by step learning Java . but no one at the University is helping , they just give us the homework and we have to learn alone.and give the soltution at the end of the week. …

Member Avatar for stultuske
0
278
Member Avatar for noobCode

Hello. Im new here. I have a question: I have this copy constructor here: /** Copy Constructor. * Since landscape is immutable in the scope of our project, you could * do a simple reference copy for it. * However, Fish and Plants are mutable, so those lists must be …

Member Avatar for stultuske
0
272
Member Avatar for riahc3

Hello Ive come up with a stupid question that just needs a why What would this do? for (int i=5; i<2;i++) { System.out.println("What?"); } System.out.println("Who?");

Member Avatar for deceptikon
0
180
Member Avatar for peymankop

Hi...! I'm Working on a Notepad project and i'm in menu->view->font but i don't have any idea how to write a function for it! can anyone help me?! thanks...

Member Avatar for aVar++
0
88
Member Avatar for game06

i have a enemy and spriteanimation classes. in Enemy class i have bufferedimage array with 4 different images. than i am creating a animation and storing in 'animationEnemyHit' variable. than i am starting and updateing the animation in method. the problem is that it keeps on loop for ever. i …

Member Avatar for gusano79
0
178

The End.