32,204 Topics

Member Avatar for
Member Avatar for plasticfood

ok i need to write something like [CODE] if { days > 5 && minutes > 5 } [/CODE] basically i need minutes to be around 5 to 10, and cannot be greater than 10. how do i do write this within the same if statement?

Member Avatar for plasticfood
0
98
Member Avatar for Andrew Davis 64

THIS IS A PROGRAM THAT WILL OPEN A WINDOW, THEN WHEN YOU CLICK CALCULATE GPA, A JOPTIONPANE THING WILL OPEN AND YOU WILL PUT YOUR GRADE IN, THAT WILL HAPPEN 2 MORE TIMES THEN THE LAST ONE WILL SHOW YOU YOUR GRADE AVERAGE. WHEN I COMPILE THIS PROGRAM, EVERYTHING IS …

Member Avatar for coil
0
299
Member Avatar for NewOrder

i established an array of objects. i want to user to name a chess piece, the name of the chesspiece then will search the object in the array [CODE]package il.co.ChessInterface; import il.co.Pawn.Pawn; import il.co.Bishop.*; import il.co.King.*; import il.co.Queen.*; import il.co.Rook.*; import il.co.Knight.*; import java.io.Console; public class ChessInterface { public static …

Member Avatar for NewOrder
0
188
Member Avatar for Xufyan
Member Avatar for vgd

import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class DerbyTest { private Connection connect = null; private Statement statement = null; private ResultSet resultSet = null; public DerbyTest() throws Exception { try { Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance(); connect = DriverManager.getConnection("jdbc:derby://localhost:`1527/vineet"); statement=connect.createStatement(); resultSet = statement.executeQuery("SELECT * FROM EMPLOYEE"); while (resultSet.next()) { String user …

Member Avatar for masijade
0
202
Member Avatar for ubi_ct83

Hi all, hope u guys r fine. i have a question about array.im using double array,but seems cant support bigger size and im planning to change it to arraylist.but the problem is, can i update the data in arraylist? [code] int value[]={9,8,9,7,9,7}; int[][] myTupple = new int[count][value.length]; repetition =1; for(int …

Member Avatar for jon.kiparsky
0
108
Member Avatar for abhikr7891

[B]How do i resolve this error...i know this exception should be thrown only when i am using an older version jre to run my class file which should be compiled with a newer jdk but i have jdk 1.6 update 18 and jre 1.6 update 21 . thanks for any …

Member Avatar for abhikr7891
0
104
Member Avatar for daudiam

I am trying to develop a software that can automatically search and download the correct subtitle for my movies. I need to compare the fps rates. How can i find the fps of a movie in java ?

Member Avatar for daudiam
0
115
Member Avatar for thilinam

Hi all, I'm using netbeans 1.6 ide to develop my project. When I build my project, netbeans create .jar file. but when I run it it also runs but not like When I run it from ide's run button. Some parts of application do not work example a button click …

Member Avatar for NormR1
0
75
Member Avatar for daudiam

[CODE]class Faltu { public static void main(String aa[]) { int a=4,b; if (a==4) b=5; System.out.println ("b="+b); } }[/CODE] Here it says : "variable b might not have been initialized", but in the following : [CODE] class Faltu { public static void main(String aa[]) { int a=4,b; if (true) b=5; System.out.println …

Member Avatar for daudiam
1
85
Member Avatar for RebelCom

I have the following XML file: [CODE]<graph caption="ECG Data Wave" subcaption="For Person's Name" xAxisName="Time" yAxisMinValue="-0.025" yAxisName="Voltage" decimalPrecision="5" formatNumberScale="0" numberPrefix="" showNames="1" showValues="0" showAlternateHGridColor="1" AlternateHGridColor="ff5904" divLineColor="ff5904" divLineAlpha="20" alternateHGridAlpha="5"> <set name="12:00:00.01" value="0.600000" hoverText = "The difference from last value: 0" ></set> <set name="12:00:00.02" value="0.640000" hoverText = "The difference from last value: 0.04" ></set> …

0
54
Member Avatar for fat0ali0ma

hi guys!:) ....first I'm new friend for u :$:$:$:$ and for first time I wanna to tell u that I wanna some help ....:S ..In the programming java... I have a game and I want to finish it....who can help me ???:S:S:S:S thx alot u r friend touma

Member Avatar for fat0ali0ma
0
180
Member Avatar for sugumarclick

hi friends, I am a novice java programmer. I am in a learning process in java servlets. But i struck into a Class method which should return a result set([B]result of a join query[/B])as a an arrayList using the existing bean class. I will show my code as some one …

Member Avatar for sugumarclick
0
194
Member Avatar for gudads

DEAR FRIENDS, I M NEW TO JAVA, PLEASE ANSWER MY QUESTIONS: 1. I am trying to use float and double in java? can u tell me how to use it? 2. I am trying to calculate simple interest in java ? please fix my code: public class simple { public …

Member Avatar for gudads
0
182
Member Avatar for Mylsamy

Hi all, I am using JAVAMailAPI for sending emails. And I set the Message.setEnvelopeFrom(ReceiveMailId); to receive the failure notice, and my problem is if the mail host and ReceiveMailId domain, it sent the failure notice, but both are different , it did not sent the failure notification email. How can …

Member Avatar for Mylsamy
0
48
Member Avatar for authi

import javax.swing.JOptionPane; class homework{ public static void main(string[]args) { String ipt,n,h,r,r2,h2,b1,b2; Double iptipt; JOptionPane.showMessageDialog(null,"1… of a Circle\n" + "2.Area of a Trapezoid\n" + "3.Volume of a Sphere\n" + "4.Volume of a Cylinder"); ipt = JOptionPane.showInputDialog(null,"Input your desired choice(1,2,3,4)"); iptipt = Double.parseDouble(ipt); if (iptipt == 1) ------ IF ELSE STATEMENTS WILL …

Member Avatar for jon.kiparsky
0
113
Member Avatar for NewAndClueless

Hi, I am new. I did my my best to read the rules first so please pardon me if i missed any. My qestion is in regards to filling up a matrix diagonally: "Write a method that accepts a square matrix. Assume that the size of the matrix is declared …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for RebelCom

Hi All, I have the following code to read in an XML file and to get the basic statistical information. I am having problems trying to get it working. Here is what I have so far: [code=java] import java.util.*; import java.io.File; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import …

0
67
Member Avatar for PeDz08

Here's the problem... I want to create a table about the stack like this: [code] ((A+B)-C) Symbol Postfix Stack ( ( ( (( A A (( + A ((+ B AB ((+ ) AB+ ( - AB+ (- C AB+C (- ) AB+C- [/code] But i don't know how to …

Member Avatar for NormR1
0
97
Member Avatar for qwest21

Hi everyone I have to write client/server client/client chat program for at least three machines(users) connected together to chat using java My questions are 1. Do i need to have a server installed ina one of the machines. 2. Do i have to run the server side onf the application …

Member Avatar for masijade
0
361
Member Avatar for glenak

Hey guys, I have two questions. I have a multithreaded server that is able to process requests from more than one client at a time. However, my server has a habit of shutting down after a while, despite that I have an infinite while loop to keep it accepting connections. …

Member Avatar for glenak
0
177
Member Avatar for phouse512

Hello, I've looked all over for the solution to this problem, but they all present a similar solution to this one and they all don't work. I've created the JFrame in the constructor for the class that this method is contained in. [CODE] public void print() { JPanel panel = …

Member Avatar for phouse512
0
76
Member Avatar for ozlem.a17

So i have to write a program that designs a basic Home CAD System. The user will be able to build a house, add/remove rooms and items, etc. I have began writing the program and all seems gravy, i decided to use an ArrayList for the list of rooms the …

Member Avatar for NormR1
0
140
Member Avatar for yap_1991

Hi all Im experiencing problems whereby my codes can only read one file instead of all files in my directory. Does anyone know anything regarding this? Below are my codes: [CODE]import java.io.*; import java.util.*; public class extractionn { public static void main( String[] args ) { File dir = new …

Member Avatar for NormR1
0
131
Member Avatar for sivasuit
Member Avatar for masijade
0
85
Member Avatar for Garee

I recently wrote a short program for an exercise in a textbook. After completion however I re-structured the program to use methods instead of one long main method. My question: Which way of programming should I be using? I am leaning more towards the methods as it is much more …

Member Avatar for JamesCherrill
0
84
Member Avatar for john butler

Hello Everybody! Can anyone please tell me about the SharedPreferences in Android Programming. I need to use it in my application but not quite clear about it. An example with coding will be greatly appreciated. Thanks, john butler

0
73
Member Avatar for james chaco

Hi, I am planning to develop a bluetooth application and i would like to know whether it is possible to connect more than 2 bluetooth devices, say 3,4,5,6,and even 10,at the same time without losing any connection between them. Bluetooth devices can be laptops or mobile with java support. Any …

0
123
Member Avatar for Dupron

Recently I have made a simple chatting application(in Java). It has two classes one for client and one for server.On compiling it is not giving any error but on running, it is not giving desired result. So, It will be grateful if you come ahead and try out helping me …

Member Avatar for yasuodancez
0
568
Member Avatar for CALGACUS

Hi Everyone, I'm fairly new to Java, and am having problems in trying to convert an ArrayList containing String arrays to an array of String arrays. I thought it would be relatively simple to do, but I keep running into problems. I've looked at all the examples I've been able …

Member Avatar for NormR1
0
158

The End.