32,204 Topics
| |
hey, i need both the import.sql.date; and import.util.date, at the moment im importing them like import.sql.*; import.util.*; How do i specify which library i want for any particular Date object? | |
im having a problem with making stack with array converted to linked list so far this is my code ... [CODE]import java.util.*; public class Nkakainis { public static void main(String[] args){ Stack <String> istak = new Stack<String>(); String[] names = {"john", "mark", "peter"}; List<String> list1 = Arrays.asList(names); System.out.println("pushed " + … | |
Hi all ive been thinking of a writing a compiler in java for my final year project. I have started to browse the net for help but to be honest its confused rather than helping me to get a clear image of what I would like to do. E.g. I … | |
Hello I am learning how to use setString() for "?" and using passwords in resultsets. my password ends up with the error [icode]java.sql.SQLException: Invalid cursor state - no current row.[/icode] Can this error be corrected? thanks. [code] run: driver tableName from xml: org.apache.derby.jdbc.EmbeddedDriver in StudentDAO.JAVA and in connect of the … | |
this code was suppose to prevent any single line from appearing twice for each display, i thought it was ok but later found that it wasnt, i was directed to use the hashset method in combination with my code to prevent that from happening, but it is not consistent, i … | |
| Hello, my name is Matias (Mathew for english people) and I am 16 years old. And I am from Argentina !!! I joined this Community because I know a lot of things that I can share here of simply respond... I am a student from an idustrial school call Huergo … |
I am trying to write one generic class for the purpose of any types of method logging. I am able to track the parameter name and their data types in my class but unable to track the parameter value which is passed at the time of function call. I need … | |
Hello if I create newUser which is new StudentBean() why is StudentBean studentBean not equal newUser? [b] output [/b] [code] run: driver tableName from xml: org.apache.derby.jdbc.EmbeddedDriver in bCreatedTables: created table: createAdminTable created table: createPayeeTable created table: createStudentTable created table: createInstructorTable created table: createBookingTable created table: createInstrAvailableTable created table: createInstrumentTable created … | |
Hello, This is my first post on DaniWeb and will probably not be the last so I hope I'm doing this right: I'm currently working on a Sudoku Solver that allows the user to type in the name of a Sudoku text file that looks like this: 6 8 . … | |
I'm writing Conway's game of life for a school assignment. I have a text file with coordinates of the initial locations with bacterium. All I need to know is how to tell java to compare a coordinate in the matrix to a coordinate from the file. The pairs are listed … | |
I am doing my home work in which i have to pass values from java text field to text text file. My code of program is given below. The problem is that the program is not passing values from text field to text file. Please help me. /** * @(#)GUITest.java … | |
Hello everybody, I have a trouble with my assignment . In my assignment, the application have to read the lists of text file before performing the another taks. I want my application run independently on any computer with JVM, so it must be read the text file in the jar … | |
Hello, some of my Friends, and I decided to make a Media player using Java just for the fun of it. here are my Questions, #1: is it possible using Java ? or should I use a different language? #2: the process of Reading||Displaying||Viewing Video files is called ? #3: … | |
Hello folks, I recently started learning Java and bought a book to look at some examples. When I copied this example program out of the book I get a null pointer exception. Most of the other programs worked perfectly this is the only one iv had a problem with so … | |
Hello I am recieving error [icode]java.sql.SQLException: At least one parameter to the current statement is uninitialized.[/icode] at ConnectStudentDAO.java at [icode]ResultSet rs=ps.executeQuery();[/icode] Not sure if the xml statment or the bean variables or if ps.close() is needed [b] output [/b] [code] run: driver tableName from xml: org.apache.derby.jdbc.EmbeddedDriver in bCreatedTables: created table: … | |
i need help, for some reason i cannot remove items that i have added to my JPanels the welcome.remove will is causing a problem [CODE]// The "RunescapeCalc" class. import java.awt.*; import hsa.Console; import javax.swing.*; import java.awt.event.*; import sun.audio.*; import java.io.FileInputStream; import java.math.*; public class Game1 extends JFrame implements ActionListener { … | |
I cannot seem to get the array to work and display the second and third loans, only the first one displays. Here is what I need to clarify the situation. I added the array to the program and it only works for the first loan. Can someone point me in … | |
* At other projects it's working. I try to do in eclipse: export -> java -> Runnable Jar... but it tells me: could not find main method... [IMG]http://i43.tinypic.com/nbapux.jpg[/IMG] but in my main class I defined it it has: public static void main(String[] args) (the file is created, but when i … | |
hi everyone. im currently working on a project where my scenario is that a company hired me to make programe for their company. what i need in my programe is [ICODE]I. Add/Update customers II. Add/Update products III. Add/Update salesman IV. Make transactions: Many products are sold to customers by salesman … | |
Hi, I want to take a character using the scanner class and then i want to find and count it in certain file i did like this char countingChar ; countingChar= scan.nextChar(); but my compiler show error at this line scan.nextChar() then i find this blog on the sun [url]http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5066699[/url] … | |
A small ferry company has just purchased a computer for its new automated ticketing system. The company director has asked you to design the new system to assign seats for each trip of the 50-seater ferry, which covers the route from Penang to Langkawi and back daily. The upper deck … | |
Hello Daniweb. I'm new to Java, and I love learning it and want to continue learning it. I was curious about how a Java chat server could be made so I found an open source very basic one online. But the problem is when I run the server it gives … | |
I am working on a project where I am building a student object from student java class. The student.java class specifies a method of: [code=java] public void setCourses(ArrayList<Course> courses) { this.courses = courses; } [/code] So I have built the following two methods in my main.java class file: [code=java] public … | |
How should i handle click events of a JButton array i have frame containing 100 JButtons .I need to find out which one was pressed by the user[code]import java.awt.*; import java.awt.event.*; import java.sql.*; import javax.swing.*; public class Screen1 implements ActionListener , WindowListener { int i; JFrame scrfrm1; JLabel lblscr; JButton … | |
Dear Friends, Please help me in getting out of the below error. I have made attachment of source file, kindly try to execute the program experience the error and guide me. D:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes\com\example\web>javac -classpath " D:\Tomcat 6.0\lib\servlet-api.jar" BeerSelect1.java BeerSelect1.java:3: package com.example.model does not exist import com.example.model.*; ^ BeerSelect1.java:15: cannot find … | |
As I understand it equal hash codes in general imply a high probability of equality between objects, but they aren't perfect. But I've been told that in Java the base hash code of an Object is simply the memory address of the object, so I've assumed that Object hash codes … | |
I understand that this means I'm using more memory than is available to the JVM, but I'm not sure why or what to do about it. The purpose of the program is to simulate an item in a store that is being tracked with a bar code id number (or … | |
Hi Guys, I need some help with a permutation problem. Say I have a string, 6 characters long - "123456" - how can I generate a list of all permutations of that string, limited to 4 characters long? So basically, each permutation generated can only be 4 characters long. As … | |
I cannot seem to get the array to work and display the second and third loans, only the first one displays. Here is what I need to clarify the situation. Can someone help me out please. Modify the mortgage program again. Remove the amortization table. This time enter 3 different … | |
help me plz , write a java program that reads a number and verifies if it has the same value when we read it from right to left and from left to right. my program should display "having the same value so it is readable from both sides" if the … |
The End.