36,051 Topics

Member Avatar for
Member Avatar for ialnima

I have a 2d 9x9 int array as follows 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 but im trying to extract every box of 3x3 into an array using only a nested for loop, i.e. ---------------- |000|000|000| |000|000|000| |000|000|000| ---------------- |000|000|000| |000|000|000| |000|000|000| ---------------- |000|000|000| |000|000|000| |000|000|000| ---------------- …

Member Avatar for iamthwee
0
83
Member Avatar for mcd200

Hi everyone, I'm running WinXP SP2 on my laptop, and I have the latest versions of Mozilla and IE. Whenever I click on certain links I get java script errors, and the window I'm trying to open never opens. I know that the problem is local to my laptop, and …

0
45
Member Avatar for sarath.koiloth

Hi friends, please help me to solve this. i need to read the elements from xml file.I am using sax api. My xml looks like this :-> <test> <test1>hello1</test1> <test2>hello2</test2> <test3>hello3</test3> </test> In my startElement(...){ elementName.equals("test"){ //I need to get all the elements inside the test element.ie test1,test2,test2.with out going …

Member Avatar for sarath.koiloth
0
114
Member Avatar for saifjob40

can we write link list program in java, if yes then please give some tips so i can write that program

Member Avatar for lookof2day
0
48
Member Avatar for CsE2007

hi , please , i have problem and i need help ......................... in calendar i want to get [U]name of day [/U] from it how ? if user select 21/9/2007 i want to get name of day "friday" to use it in anther funcation :(

Member Avatar for orko
0
90
Member Avatar for rohit saroha

Pls Tell Me Name Of A Reference Book On Jsp,which Contain All The Features.does It Available Online...

Member Avatar for jwenting
0
69
Member Avatar for KimJack

Hello All, I am trying to parse an ArrayList of Strings into an ArrayList of integers. Does anyone have any opinions on how this should be done? I can parse one element, but parsing the entire string where I am having problems. Any suggestions would be great. Thanks

Member Avatar for KimJack
0
101
Member Avatar for kotigadu
Member Avatar for Ezzaral
0
29
Member Avatar for komox

Good evening everyone. Im now going to do my final year project and its about creating mobile application for a university student.I would like to use the java platform to create the application. I need some advises and also the right tools to create the application. So programmers i really …

Member Avatar for Ezzaral
0
101
Member Avatar for ajcornwell

I cannot make my code loop.... Anyone please help! /* PRG420 Week 2 Individual Project Amanda Cornwell September 10, 2007 MortgageProgramCornwell.java This program will calculate and display the monthly mortgage payment amount, given the amount of the mortgage, term of the mortgage, and the intrest rate of the mortgage. Next, …

Member Avatar for orko
0
147
Member Avatar for sarath.koiloth

Hi, i want to get an xml file from a web application. what are the procedures to access the file.

Member Avatar for sarath.koiloth
0
143
Member Avatar for ttamilvanan81

Hai everyone, i am doing one Image gallary application. In that application i have upload two images, one for Befor image and another one for after image. All those images are stored into the filesystem, the images names only stored into the database. Left side of page: Before Pictures (One …

0
86
Member Avatar for doreigon

This is a lab I am working on. I think that I am on the last step. My problem/question is highlighted in bold. 1. Create a constructor that allows you to specify the 2 endpoints of the line being created. Leave the original constructor alone. Your program should have 2 …

Member Avatar for doreigon
0
598
Member Avatar for vinod_javas

hi everyone i have a very a very basic question in mind .. i wanted to discuss .. Difference Between these? String s1= new String("java") ; String s2="java" ; and also what for 2 different classes are there in garbage collection? System.gc and runtime.gc ( both are doing the same …

Member Avatar for vinod_javas
1
145
Member Avatar for pacian

I think someone's trying to hack my computer, and steal my passwords. For some reason, websites that I'm logged onto, and should stay logged on, suddenly log off when I refresh the page, then are logged back on. My gmail account was logged off for some reason too, and that …

Member Avatar for gerbil
0
139
Member Avatar for 9Mark9

Hello all just signed up and this is first thread.I am currently learning java and as a means to this i am writing the mastermind game in java.Can anyone point me in the right direction regarding getting the board facr on the grid and manipulating it. cheers

Member Avatar for iamthwee
0
117
Member Avatar for rohit83.ken
Member Avatar for iamthwee
0
69
Member Avatar for volscolts16

I having a small problem with the output on the Your CD's side, they are only viewable if I double click inside the pane, then they show up, almost like the pane is on top. How can I fix, I have tried moving things around and changing the TextArea to …

Member Avatar for volscolts16
0
583
Member Avatar for KimJack

Can anyone provide any suggestions on how to copy an ArrayList of integers to an Array? Thank you

Member Avatar for masijade
0
94
Member Avatar for bdichiara

I am new to JSP and struggling with this issue. I created a Hello World page and worked fine. After I made some changes, I uploaded the new version of my index file several times. I have even deleted my index.jsp file from the server, along with the WEB-INF and …

Member Avatar for ksaxena
0
119
Member Avatar for MonkeyGarage

Search.java: [code] package com.monkeygarage.carclubhub.clubinfo; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Logger; import com.monkeygarage.DBConnect; import java.util.logging.Level; import java.util.*; public class Search { private List<SearchResults> list = new ArrayList<SearchResults>(); DBConnect db = new DBConnect(); public Iterator getResult() { Result(); return list.iterator(); } private void Result() { try { ResultSet rs = db.getResult("SELECT club.clubId, …

Member Avatar for MonkeyGarage
0
156
Member Avatar for MonkeyGarage

Any idea? I get this error: org.apache.jasper.JasperException: An exception occurred processing JSP page /test2.jsp at line 7 4: <title>DB Test</title> 5: </head><body> 6: <% DBConnect d = new DBConnect(); 7: ResultSet rs = d.getResult("SELECT name FROM items"); 8: 9: while (rs.next()) { 10: String name = rs.getString("name"); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435) …

Member Avatar for MonkeyGarage
0
115
Member Avatar for abar_sow

For my proje i want to remove a unwanted paragraph in a text file. For example my text file may have acknowledgment in between sum useful data so i want to remove the acknowledgment paragraph fully...can anyone tel how to do tat

Member Avatar for Ezzaral
0
105
Member Avatar for a51himself

Hi i am having trouble with a html web page. I am trying to add a Java chat program to my web page. Can i please get some advice Thanks A51himself Nigel Chan

0
47
Member Avatar for George2

Hello everyone, I am wondering if I want to debug JNI application (upper layer Java and lower layer C), are there any tools to debug through Java code to C code and return back from C code to Java code. I am using Eclipse. But I do not find such …

Member Avatar for vvl
0
143
Member Avatar for KimJack

Hello all, I have a text file with columns of words Boat Car Van Sue Bird Hue Billy Don Yoe... How do I read each separate column into separate arrays. Array 1 will read: Boat Sue Billy Array 2 will read: Car Bird Don... Any suggestions on how to accomplish …

Member Avatar for KimJack
0
121
Member Avatar for bluebird

Hello! I am trying to add new data into a database. What is the mistake in my code? I got the error message such as "general error". [code] import java.awt.*; import java.awt.event.*; import java.sql.*; import javax.swing.*; public class AddRecord implements ActionListener{ private ScrollingPanel fields; private JTextArea output; private Connection connection; …

Member Avatar for masijade
0
111
Member Avatar for Rashul

Hi. Please help. I can't seem to get this program to run. Tips.java Modify the exercise shown below so that it will loop, calculating a new tip each time until the user enters a value zero or smaller for the amount of the bill. Make sure there is a nice …

Member Avatar for Rashul
0
104
Member Avatar for ceyesuma

[code] public static Connection getConnection(){ if(connection==null){ try{ Class.forName("org.gjt.mm.mysql.Driver"); connection=DriverManager.getConnection("jdbc:mysql://localhost:8084","root","ceyesuma"); }catch(Exception exc){ connection=null;} } return connection; } [/code] Here is the bean to get connected. Should this work? [code] package db; import java.sql.*; import java.sql.DriverManager; import java.sql.Connection; /** * * @author James */ public class DBConnection { static String dbdriver; static …

Member Avatar for ceyesuma
0
134
Member Avatar for ceyesuma

I made more progress ong CreditCard program I am trying to insert a row into mysql from a creditcard account number. Could I get some feed back on why it as a problem with the url it looks like it wants to insert a record. [code] package creditcard; import db.DBConnection; …

0
52
Member Avatar for kohuke

I have a program that will find the certain ammount of fibonacci numbers. And now i have the question which is the best code for counting time in fibonacci algorithm? I have to find out how many numbers can my algorithm count in 1 minute? the code: [code]//rekursiivne algoritm public …

Member Avatar for kohuke
0
154
Member Avatar for ceyesuma

Can someone give me pointers on what needs to be done to get these classes to INSERT INTO acctData VALUES (99999999, '2000-7-3',30,'food',50); a deploy.txt is included containing the following. thanks [code] package creditcard; import db.DBConnection; import java.lang.Object.*; import java.io.*; import java.sql.*; import java.util.Date; import tio.*; import java.io.File.*; import java.io.IOException; class …

0
45
Member Avatar for MxDev

hi guys, i wonna to code simple program that could control the system threads in the system by block or start a new job, how to do this in java, or from where i can start to acheive this. thx,

Member Avatar for ksaxena
0
77
Member Avatar for alsoumhi

Exuse me gys, I am a biggener in java and I would like to know how to use the data file in java such as taking data from the file and printing the data in new file is there any class library carring out this task please reply to me

Member Avatar for darkagn
0
144
Member Avatar for Icetigris

Hey everyone. This is pretty lame of me having to do this, but I haven't done Java for about a year and this algorithms class I'm taking assumes we remember all the details. Anyway, I'm trying to implement a method from an interface in another class's main method. Here's the …

Member Avatar for jtonic
0
135
Member Avatar for mimsc

any suggestions...my "weatherState" value doesnt seem to be passing over: 1st jsp: [code]<% Vector theStates = WeatherDAO.getWeatherStates(); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </script> <body> <TR bgColor="#ffffff"><TD COLSPAN="2"> <TABLE CELLPADDING="3" CELLSPACING="2"> <TR><TD> </FONT></CENTER><BR> <BR> <TABLE BORDER="0" CELLSPACING="5" CELLPADDING="5" WIDTH="100%"> <TR BGCOLOR="#C0C0C0" ><TD COLSPAN="2" ALIGN="CENTER"> <FONT SIZE=+3><B> …

Member Avatar for aniseed
0
146
Member Avatar for activeap

i am working in a small company.. i want to make a setup of linux server, my sql server and working with java. please give me suggestions and requirements for these...

Member Avatar for aniseed
0
104
Member Avatar for ceyesuma

I would like to return a connection to a Bean to make statements to mysql database "ccdb" I'm really not sure of [code] public static Connection getConnection(){ if(connection==null){ try{ Class.forName("org.gjt.mm.mysql.Driver"); connection=DriverManager.getConnection("jdbc:mysql://localhost:8084","root","ceyesuma"); }catch(Exception exc){ connection=null;} } return connection; } [/code] Here is the bean to get connected. Should this work? [code] …

Member Avatar for ceyesuma
0
185
Member Avatar for KimJack

Hello all, I wondering if anyone could tell me how to go about extracting a single field from a text file. The file is all follows: Jeff 8.00 8.9900 hadk Kim 234.0 234 hak Him 444.8 1.11 john... How would I extract only the first column without using tokenizer or …

Member Avatar for ~s.o.s~
0
122
Member Avatar for Notsogood.java

(I'm not even close to being sure that this is even a valid approach to what I want to accomplish. Still, all input is welcome. What I was trying to do was create an applet that reads): "Please pass the butter." A quote by jack padron ------------------------------------------- Can you think …

Member Avatar for lookof2day
0
129
Member Avatar for KimJack

Can someone tell me why my data is not printing to my file. It will create the text file but it will not write to it. Here is a snippett: out = new PrintWriter("completeAuto.txt"); while ((car = br.readLine()) != null && (van = br1.readLine())!=null && (truck = br2.readLine()) != null) …

Member Avatar for peter_budo
0
190
Member Avatar for CurtisBridges

/*Please help. I'm trying to throw an IllegalArgumentException. *If any test score in the array is negative or greater than 100 *using a try block, but am having little if any progress after 9 hours of work. * I am still getting an error mesage saying illegal start of expression …

Member Avatar for peter_budo
0
441
Member Avatar for ryy705

Hi, I am writing a desktop application. It would make my life easier if the application can save all it's data in a database software. Do typical desktop applications come packaged with 3rd party database software or do they rely on internal serialized data structure? If 3rd party database applications …

Member Avatar for ryy705
0
197
Member Avatar for abar_sow

How to write these file datas in the new file...It should be done by wrting bytes into characters import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileNotFoundException; import java.io.IOException; public class fileread { public static void main(String[] args) { File file = new File("E:\\ir_Proj estimate_out.txt"); byte[] b = new byte[(int) file.length()]; …

Member Avatar for abar_sow
0
140
Member Avatar for sasidhar1229

I want to develope a project in java . How companies developes projects. What are the different stages in development a project from initial stage to product delivery stage. For example SRS,UML Diagrams(please tell me the articales which are good to know these). Is there any sites which gives sample …

Member Avatar for sasidharnet
0
171
Member Avatar for Renzokouken_22

import java.sql.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class DisplayQueryResults extends JFrame { private Connection connection; private Statement statement; private ResultSet resultSet; private ResultSetMetaData rsMetaData; private JTable table; private JTextArea inputQuery; private JButton submitQuery; public DisplayQueryResults() { super( "Enter Query.Click Submit to See Results." ); String url …

Member Avatar for iamthwee
0
222
Member Avatar for mallim

Hey guys! I only just discovered this website about an hour or 2 ago aaaaaand well, I was wondering what y'all can tell me about possibly creating some kind of text-based game in Java? I don't know much about any of this programming stuff but I would really like to …

Member Avatar for jwenting
0
85
Member Avatar for vladdy19

I'm getting errors for my switch statement stating that all of my cases are orphan cases does any one know why that is?

Member Avatar for jwenting
0
63
Member Avatar for KimJack

I am trying to read a line from a file, then print only the first word in the line. It needs to do this until the end of the file. The file is as follows: Bib 0.9898 .iuiu k.kljlkj .98908 Joel .0909 .iuou k.iopi .jlkj ... I need it to …

Member Avatar for KimJack
0
86
Member Avatar for claudiu_is
Member Avatar for Ezzaral
0
127

The End.