32,199 Topics

Member Avatar for
Member Avatar for jahanruhi3@gmai

package com.batch; import java.sql.*; import java.text.SimpleDateFormat; import java.util.ArrayList; import DBConnection.DBConnect; public class Batch { @SuppressWarnings({ "unchecked", "rawtypes" }) public ArrayList BatchAction(String ik) { Connection conn = null; Statement st = null; ResultSet rs; ResultSet rs1; ArrayList al = new ArrayList(); conn = DBConnect.getConnection(); final SimpleDateFormat monthDayYearformatter = new SimpleDateFormat( "dd …

Member Avatar for stultuske
0
201
Member Avatar for shean1488

Hi everybody. I have a question: My code produces only 1's. Does it show that processor can only do one task at a time or it is just simply becouse I made something wrong? [CODE]import java.lang.Thread; public class SleepThread implements Runnable{ public final int sleepTime = 1000; public String str …

Member Avatar for stultuske
0
137
Member Avatar for Pravinrasal

I have stored an array in database field name "[B]exp_values[/B]" like : [{"concentration":"30","answers":60},{"concentration":"30","answers":60},{"concentration":"30","answers":60}] and I want to retrieve from database I am using spring and I created pojo(bean) class like [CODE]public class ExperimentParameterBean { private String username; private String[] exp_values; public String getUsername() { return username; } public void setUsername(String …

Member Avatar for Pravinrasal
0
163
Member Avatar for Vampiricx3

hey guys, I'm studying to be a pro C++/Java programmer and are currently working in Ubuntu, is this a suitable choice? Or is there a more suitable linux distro?

Member Avatar for jbennet
0
287
Member Avatar for raviaaaa

Hi i am getting below exception when iam trying to run the tomcat 5 in localhost can u please tell me the steps to solve the problem java.lang.NoClassDefFoundError: sun/tools/javac/Main org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128) org.apache.jasper.compiler.Compiler.compile(Compiler.java:271) org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546) org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177) org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Member Avatar for jackbauer24
0
234
Member Avatar for lordsurya08

I am writing a game in which I need to draw text onto the screen. As I understand it there are two main ways to do this using Graphics2D - using GlyphVector and using drawString(). Of the two I prefer the previous because it allows me to define text as …

Member Avatar for jackbauer24
0
211
Member Avatar for Arpssss

I have a Hash Table like, HashTable ht = { (1, 1), (2, 1), (3, 1) } Now, I implement it like, Integer foo = Integer(1) and declare hash table like, HashTable ht = { (foo, foo), (2, foo), (3, foo) } Now, as per I understood from [URL="http://www.kdgregory.com/index.php?page=java.refobj"]this[/URL], it …

Member Avatar for JamesCherrill
0
185
Member Avatar for jayadan

How to convert these inputs as regular natural numbers 1) 0x000F 2) 0x2222 and similar inputs likes this. Guys i want the coding part and also the simple manual regular calculation part too. Thnks in advance.

Member Avatar for JamesCherrill
0
130
Member Avatar for TIM_M_91

Hi guys I have a loop that increases my setsize to 1100 which works fine. My question is is it possiable for when I click my button the loop executes then if I click the button again it does not execute the loop and carry's on with the rest of …

Member Avatar for stultuske
0
96
Member Avatar for RDane
Member Avatar for jasonw749

hi guys, first time posting here. so i have this menu for a game i am making and the image that i have for the menu background has text and things already loaded onto it. what would be the best way to have the text clickable? would it be to …

Member Avatar for jasonw749
0
174
Member Avatar for coderN

[B]Hi Guys What I am trying to do is this. String[] array1 = {"off","off","meeting"}; String [] array2 = {"off","off,"off"}; String[] array3 = {"meeting","off","off"}; I want to make an 4th array which will give me "off" at the position where all are off, otherwise it say "bz" at that position. FOR …

Member Avatar for NormR1
0
110
Member Avatar for TIM_M_91

Hi guys what I want to do is set a new setSize which I can do but it just appears. Therefore what I want is for the setSize to move over time instead of just flicker and appear. Any help would be appriciated: [CODE] if (e.getSource() == set) { setSize(1000,1000); …

Member Avatar for JamesCherrill
0
138
Member Avatar for DEAD TERMINATOR

I have a couple of questions about a school project I'm working on. The code is as follows. [code]public class Player { private PlayList playList; private Track track; /** * Constructor ... */ public Player() { playList = new PlayList("audio"); track = playList.getTrack(0); } /** * Return the track collection …

0
88
Member Avatar for mits28

I am using two ResultSet in a single statement..this code is a part of servlet.. [CODE] String temp=request.getParameter("cid"); int cid= Integer.parseInt(temp); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:Mydatasource"); PreparedStatement ps = con.prepareStatement("select * from Products where cid=?"); ps.setInt(1, cid); ResultSet rs = ps.executeQuery(); while(rs.next()) { out.println("<a href = 's_BikeServlet?pid="+ rs.getInt(1) + "'>" …

Member Avatar for mits28
0
463
Member Avatar for applejax77

Below is an address book program I am working on. The way it stands now, when the data is entered and writes to a text file it writes the line of data like, John Doe 1234 Help Me Avenue Dallas Texas 98956 Johnathan Doe 2345 Derby Lane Omaha Nebraska 45678 …

Member Avatar for applejax77
0
243
Member Avatar for aanders5

Ok, so I am making a game and the music changes when you are in different regions or if there is an interruption, like with an AI. So I have JUST learned how to make music showup in my program, and now I am trying to make it stop, but …

Member Avatar for Philippe.Lahaie
0
3K
Member Avatar for lena1990

i want applet connect to another machine but the socket cannot connect to the server i searched the web and there is something about giving permissions to the applet but i donnot know how to do so

Member Avatar for NormR1
0
375
Member Avatar for LFCFan_07

Hey guys, I need help finding out what is wrong with my code, I have no errors, but it is not doing what I want it to. I need my code to print a bar code when a user inputs a zip code. My program does not get to the …

Member Avatar for NormR1
0
199
Member Avatar for shean1488

Hi everybody, In my little programm, that prompts user to choose txt file, and then displays how many each particular token in the file. I have a little issue with organising the ouput. I think I do something wrong with String.Format, can you please help me: I attached my ouput. …

Member Avatar for Philippe.Lahaie
0
133
Member Avatar for clapton

Hi. I wrote this program claculator java rmi.but not implemented. you can help me? [CODE]import java.rmi.Remote; import java.rmi.RemoteException; public interface calculator extends Remote { public long add(long a, long b) throws RemoteException; public long sub(long a, long b) throws RemoteException; public long mul(long a, long b) throws RemoteException; public long …

0
60
Member Avatar for Ashenvale

Hi guys>.< I'm trying to make a program that suppose to output like this: [QUOTE]Enter a String: [COLOR="red"]1231asd[/COLOR] No. of Digit: [COLOR="red"]4[/COLOR] End the Program? [COLOR="red"]y[/COLOR] [/QUOTE] *the [COLOR="red"]red[/COLOR] part is the input from the user. but the problem is, the no. of digits only display 0 and not the …

Member Avatar for Philippe.Lahaie
0
111
Member Avatar for jahanruhi3@gmai

package com.batch; import java.sql.*; import java.text.SimpleDateFormat; import java.util.ArrayList; import DBConnection.DBConnect; public class Batch { @SuppressWarnings({ "unchecked", "rawtypes" }) public ArrayList BatchAction(String ik) { Connection conn = null; Statement st = null; ResultSet rs; ResultSet rs1; ArrayList al = new ArrayList(); conn = DBConnect.getConnection(); final SimpleDateFormat monthDayYearformatter = new SimpleDateFormat( "dd …

Member Avatar for reubenj
0
148
Member Avatar for devin2203

Hey everyone I have created an application interface using Java swing on a mac, which looks exactly how I want it. However on windows and Linux the positioning of the components and what seems to be the dimensions look of place. I have tried to make the sizes of everything …

Member Avatar for JamesCherrill
0
163
Member Avatar for apanimesh061

[CODE] import java.io.*; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.lang.*; import java.util.LinkedList; import java.util.List; /** * * @author Animesh Pandey */ public class Main { public static int [][] sort( int a[][]){ int i, j, t = 0, t1 = 0, t2 = 0 ; for(i = 0; i < a.length; …

Member Avatar for NormR1
0
194
Member Avatar for Samaka

Hello, I'm doing a simple J2EE application that will interact with a database like Oracle and you know that a database can have multiple oracle schemas and that is the problem (because I do not know how to configure hibernat with multiple schemas :( because my application can handle multiple …

Member Avatar for Samaka
0
209
Member Avatar for applejax77

Below is an address book program I am working on. The way it stands now, when the data is entered and writes to a text file it writes the line of data like, John Doe 1234 Help Me Avenue Dallas Texas 98956 Johnathan Doe 2345 Derby Lane Omaha Nebraska 45678 …

Member Avatar for Philippe.Lahaie
0
172
Member Avatar for justindill

costPerItem, itemQuantity, and productName keep getting the error "cannot find symbol" [CODE]package shoppingcart; import java.text.DecimalFormat; public class ShoppingCart { private double totalCost; private LineItem[] myItems; private int max = 100; int numberOfItems; //Provide a constructor for this class public ShoppingCart(int size){ max = size; this.totalCost = 0; myItems = new …

Member Avatar for NormR1
0
142
Member Avatar for mp9036

/** A programme which converts weight from pounds to kilograms and the height from inches to centimeters, then it calculates body mass index. @author */ import java.util.Scanner; public class BodyMassIndex { public static void main(String[] args) { Scanner BMI = new Scanner(System.in); System.out.println(BMI.nextLine()); double p, k, c, i, bmi; Scanner …

Member Avatar for stultuske
0
277
Member Avatar for crash bash

Hi Guys i do not know how to create Array of object could you help me plese?

Member Avatar for ztini
0
106

The End.