32,204 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
**give me source code if anyone can** | |
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 … | |
write in java language,to find the maximum,minimum andmean value of asset of floating point numbers to be supplied by the programmer user | |
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 … | |
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 … | |
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" … | |
hi, how can I make the size of the array is equal to the number of elements in the array | |
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 | |
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 | |
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 | |
Why Java is platform independent? And how to set path in Java? | |
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. … | |
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 … | |
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?"); | |
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... | |
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 … |
The End.