32,204 Topics
| |
college academic controlling all departments i want new ideas to this project in java. | |
I am trying to create a simple AI (for four in a line). I have looked online and found a few complicated AI's but they were to complex for me. I am trying to use recursion and maxDepth to create an AI to play two moves ahead. public class AIMove … | |
So i have a class that takes 2 generics types: public class Something<K,V>.... In another class, i'm trying to create an array of Something objects. how do i do this? i'm getting an error with this: Something <K,V>[] s = (K,V[]) new Object[size]; | |
Hello, I would like to retieve data into my combobox. I have done this so far but when I click on the button it's not giving me anything: public void displayItem(int data1) { String sql = ("select * from Students limit ?,1"); try { st = (PreparedStatement) con.prepareStatement(sql); st.setInt(1, data1); … | |
This is the error i get.. Enter employee name: Bryan Enter employee's salary: 123 Enter employee name: Mark Enter employee's salary: 456 Enter employee name: Fajutag Enter employee's salary: 789 Enter employee name: qwe Enter employee's salary: 32 Enter employee name: qew Enter employee's salary: 312 Enter employee name: qew … | |
Do you know how to create a java program with gui output?Please help me,it so hard to do..tnx a lot | |
Hi, I'm new to junit. I want to create test cases for if condition,loops. do we have any guidelines to write test cases for if conditions.Can any1 explain with an example. Thanks in advance. Lavanya | |
Hello Im using org.apache.commons.net's FTP object to make FTP transfers. The problem is that when the IP is down (example, the PC is turned off) a exception saying "No route to host" pops up and not only delays my program but gives a nasty error. How can I avoid this? … | |
Hey, new to java, but trying to build a text-based adventure game similar in gameplay style to the original Zork series. http://pot.home.xs4all.nl/infocom/zork1.html This is not homework. It started as a way to practice what i've learned, but now I am determined to make this work with the simplest code possible. … | |
So I'm parsing a CSV and trying to create a new object from each record. Using BufferedReader != null runs thru the file just fine. Now I use string.split method to put each line into an array. Ideas on how to use the values in the array to create the … | |
public void inOrderTraversal(TreeNode node) { if(node == null) { return; } inOrderTraversal(node.getLeft()); System.out.print(node.getKey() + " "); inOrderTraversal(node.getRight()); } I wrote this code for going through a binary search tree and printing out the items in order from low to high. it works just fine but i need to get it … | |
Good Day i just wanted to ask what does (x1, y1, x2, y2) in g.drawLine in creating a line in java applet.. thanks in advance | |
[CODE]public class MinDif { public static void main(String[] args) { EasyReader keyboard = new EasyReader(); EasyWriter screen = new EasyWriter(); //Create an array to the length of the specified entry int numItems=keyboard.readInt("Enter the length of the array: "); String[] myArray = new String[numItems]; // Read in the contents of the … | |
can anyone convert this code to GUI?? I really don't know where to put the GUI codes in it.. :( please help.. :( import java.util.Scanner; //main class public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the size of the array: "); int … | |
I've client and server on my wireless LAN , I can easily ping from client to server any time n, similarly i can ping from server to client for one time and after the application is run. I cannot ping again to the client from server. Why this is happening … | |
Hello, I am struggling to find out what im doing wrong in this code. I am new to programming and i am stuck. Ive altered my original code after finding great help online but i am stuck...again. any help will be greatly appreciated. public class CreateDelivery { public static void … | |
What are the constraints on the argument values of these two methods, and explain what the method does. int power( int base, int exponent) { if (exponent == 0) return 1; else return (base * power(base, exponent -1)); } int factorial (int n) { if (n > 0) return (n … | |
if i divide a float value from 0 then i get output:- infinity and then throws NumberFormatException why can anybody favour me. | |
Hi, How to do the custom FindBugs in Eclipse. I want to catch the specific bus from code | |
The problem I am having is in Juno Eclipse. "school.nextString" is being underlined in red to highlight a critical error. The basic purpose of this program is to ask the user a series of simple questions with if loops to determine the output given. Eclipse is handy and gives me … | |
i wanted to program that is like an musical composition !!!i mean like a musical composer with buttons where each button when pressed gives a different tumes or sounds !! can anyone do me a project on this !! plzz | |
I'm creating this in java 4 buttons and output area When the user click button 1 it will show in the output the following 564(0, 0) // 564 is id number and 0 is location in the x axis and 0 is in the y axis 564(2, 6) //using v.move … | |
Hey guys, I'm trying to make this program that allows a person to set the size of an array to any value they choose. Then, the program will ask the user to input n values to be stored in the array at the corresponding index. Then the program modifies each … | |
My Android preference (menu) is not opening a new activity. When I click the 'menu' button on the emulator, I can see my 'Setting' option. However, when I click the 'Setting', the setting page is not showing. There is no error and warning. Thank you for your time. I am … | |
I am having some difficulties getting this code to work properly. I cannot figure out how to correctly return all of my methods because I have the println listed inside the methods. So when I run my program, I get the println's , plus the return value. But I don't … | |
So I have a question about using methods. Alright, let say I want to create a system of atm and bank. I create a class account that has all related attributes such as acc # and balance and blah. Then I create an ATM class that contain methods such as … | |
I collected the data off the form and placed it in a bean class, DataBean. JRBeanCollectionDataSource constructor takes Collection as parameter, so i should convert the bean data into some kind of collection, like list, and then pass it into JRBeanCollectionDataSource and pass its instance to JasperManager.fillReport method. In iReport … | |
//Hey I need some help //Write a JAVA application that displays a traffic light (three circles inside a rectangle with //red, yellow, and green color) and three buttons with red, yellow and green titles. The //application should turn the appropriate light on when the appropriate button is clicked. Two //lights … | |
Is There Any Compiler like a Cross Compiler Which Can Generate Machine/Executable Code That Can Be Executable On Different OS ? | |
Hello, I have my JFrame and I want to ve a sliding menu on the side that will not be visible until someone click on a button. I have divided my JFrame into two containers but don't know how to proceed. Something a bit similar to this: http://www.andrewsellick.com/examples/sliding-side-bar/# |
The End.