35,618 Topics

Member Avatar for
Member Avatar for junichiro90

Last time i was facing a problem to connect or link to database for my java program. Actually i have to implement a reservation system, but then after i have sucessfully connect to database, i found out that i can do everything in database, then the class which i create …

Member Avatar for JamesCherrill
0
102
Member Avatar for bibiki

I have the following code: [CODE]import java.util.*; public class Final{ private double guess = 1; public Final(double x){ root(x); } public double root(double b){ double rez = -1; if(Math.abs(guess*guess - b) < 0.001){ rez = guess; } else{ guess = (2/guess + guess)/2; rez = root(b); } return rez; } …

Member Avatar for JamesCherrill
0
76
Member Avatar for khRiztin:)

I would like to set and display a score that varies on how fast the correct answer was made. For example..a question would be answered for only a minute..and the score would be 20points for answering in the range of 1-10 seconds, 15points for answering in the range of 11-30 …

Member Avatar for khRiztin:)
0
108
Member Avatar for wtf4096

My offline data processing tool (written in C++) is being wrapped under webservices so that it can be executed remotely. We did that already - meaning we have a webservice that can kick off the data processing. However, for some reason, the very same webservice should not grab the data …

Member Avatar for garryamin
0
144
Member Avatar for tinamary

i know the concept of abstract class in java and this concept is used in interface, i.e all the methods declared in interface are abstract. i want to know how the abtract class is different from the normal class in java Thanks a million

Member Avatar for jon.kiparsky
0
155
Member Avatar for Yaserk88

Hi I'm trying to create a random number generator with float values ranging from -1 to 1 i.e.. [-1,1]. The only problem is I can only find methods that do it from [0,1]. Can anyone help me with this? Here is what I have so far.... [CODE]Random r = new …

Member Avatar for tong1
0
98
Member Avatar for NewOrder

my goal here is to create a new array from the old array according to a Criteria that i set (all numbers above 100 and even).. however the program gives me 2 mistakes, and i dont know why? [CODE] public class Array { public static void main(String[] args){ Manipulate manipulate=new …

Member Avatar for jon.kiparsky
0
93
Member Avatar for twistedphrame

Hi, I'm attempting to generate a new cipher key using a string that was negotiated earlier on. On running the code I get the error: Exception in thread "main" java.lang.IllegalArgumentException: Missing argument at javax.crypto.spec.SecretKeySpec.<init>(DashoA13*..) at shared.Cryptographer.makeCipher(Cryptographer.java:254) at client.Main.main(Main.java:60) Java Result: 1 the code is as follow: [CODE] public void makeCipher(String …

Member Avatar for twistedphrame
0
918
Member Avatar for micial30

can anyone help me to construct the code: i dont know how to make the code of entering the operator ,the function of the operator when it was input and the output of the result . limit of the result is 500, Enter First Number:2 Enter Second Number:6 A=+ || …

Member Avatar for coil
0
163
Member Avatar for BestJewSinceJC

[CODE] Integer i = 5; Integer j = 5; if (i == j) System.out.println("true"); [/CODE] ^ Prints true [CODE] Integer i = new Integer(5); Integer j = new Integer(5); if (i == j) System.out.println("true"); [/CODE] ^ Does not print true. I understand that in the second case, the == is …

Member Avatar for BestJewSinceJC
0
109
Member Avatar for glenak

Hey guys, check this out: [CODE] File test = new File(path + "person.data"); FileOutputStream fos = new FileOutputStream(test); ObjectOutputStream oos = new ObjectOutputStream(fos); Person p = new Person(); Person p2 = new Person(); p.setName("Sub Zero"); p.setGender("Male"); p2.setName("Sonya Blade"); p2.setGender("Female"); ArrayList<Person> people = new ArrayList<Person>(); ArrayList<Person> people2 = new ArrayList<Person>(); people.add(p); …

Member Avatar for glenak
0
19K
Member Avatar for tinh khau

My friend; Please help. The green line below is working with a hardcode ApplicantId, and all I need is to make it work by passing the current ApllicantId column on the same gridrow. I tried for many days now, and something like the red line does not work for me. …

0
25
Member Avatar for neigyl_noval

Hi everyone. I wonder why the following code doesn't draw anything. [code=java] package AssProgLang; import java.awt.*; import javax.swing.*; import java.util.*; public class AssOutput extends JPanel { public AssOutput(Queue translatedQueue) { this.translatedQueue = translatedQueue; outputFrame = new JFrame(); outputFrame.getContentPane().add(this); // outputPanel attributes outputFrame.setLocationRelativeTo(null); outputFrame.setPreferredSize(new Dimension(640, 480)); //this.setPreferredSize(new Dimension(640, 480)); outputFrame.pack(); outputFrame.setTitle("ASSâ„¢ …

Member Avatar for JamesCherrill
0
345
Member Avatar for NewOrder

This code should return the same object every time. there is a part that i dont understand in the code. why to use private identifiers and then set/get method? why to hide your code variables/methods? [CODE] public class SingeltonEx { public static void main(String[] args) { Singelton singelton=Singelton.getSingelton("Roni"); System.out.println(singelton.getName());//Roni Singelton …

Member Avatar for JamesCherrill
0
178
Member Avatar for NewOrder

i have a bit a weak understanding of those 2 concepts. could you explain to me what is happening in that part of the code? [CODE] public class Part5{ public static void main(String[] args) { // Object[] zoo=new Object[4]; // zoo[0]=new Cat(); Object[] animals=new Object[4]; animals[0]=new Cat(); animals[1]=new Dog(); animals[2]=new …

Member Avatar for NewOrder
0
117
Member Avatar for thamsg

how to validate the date in text field if wrong month or date is entered ex if month>14 or date >31

Member Avatar for cale.macdonald
0
62
Member Avatar for musikluver4

I want to be able to input two (2) 'grades' exactly like they are in the String array and have it come back printing BOTH showing the grades, again, as well as the grade score corresponding to those grades. For example: input C- (enter) B+ (enter) output does: ONLY the …

Member Avatar for samuel_okos
0
689
Member Avatar for iSax

I am a newbie in Java programming. There're one question requesting us to construct an algorithm to sum up all the odd numbers from 0 to 100. Is this consider an algorithm? • Start • set sum to 0 • set number counter to 1 • while number counter <= …

Member Avatar for JamesCherrill
0
99
Member Avatar for P00dle

Hi Daniweb. I just read the other threads on regex and couldn't find the help I am looking for. The problem is simple. I have a bunch of settings in a .xml file which I read into my program. One of the settings is '*.txt', which is used for regex …

Member Avatar for P00dle
0
135
Member Avatar for amrutan

can anybody tell me, how to create table dynamically in the same JSP page. I'm using Jsp servlet and hibernate technologies.

0
48
Member Avatar for micial30

Can you help me to complete the code for this? The result should be in words. And wether 'A' or 'a' will be ok when you input the operator. this was the given: Enter First Number:8 Enter Second Number:9 M=* || m=* D=/ || d=/ A=+ || a=+ S=- || …

Member Avatar for Xufyan
0
88
Member Avatar for aro_kai

i am beginner in java field.can anyone suggest me how to start image processing in java...

Member Avatar for =OTS=G-Man
0
111
Member Avatar for nirvan v. jain
Member Avatar for fringe

selection menu : 1…Area of a Circle ----(3.14 * (r*2)) 2.Area of a Trapezoid ---- (height * (base1+base2) / 2) 3.Volume of a Sphere ---- (.75 * 3.14 *(radius*2)) 4.Volume of a Cylinder ---- (3.14 * (radius * 2) + height how would i make this using methods and switch …

Member Avatar for tong1
0
123
Member Avatar for Elisa

I would like to learn how to program in Java. Does anyone have any textbook /other resource suggestions?

Member Avatar for yasuodancez
0
364
Member Avatar for glenak

Hi, So, I did create a client and a server, and all of them work pretty well. When I send messages to the server, rather than sending one message at a time, I put the information in a class, say like a Person class - I put set the Person's …

Member Avatar for ~s.o.s~
0
89
Member Avatar for glenak

While I know how to set this up perfectly, I was wondering, is it possible to set up my jdbc connection with my access database so that I have to put in a username and password? I would really like to do this with access, if it's possible

0
67
Member Avatar for balucec

pls suggest me some methods for noise removal of a document image and also about the removal pf the background components of the document image like rules, margins etc.

Member Avatar for coil
0
51
Member Avatar for fr0styh3rb

Hello, I am having some trouble compiling my code for the inventory program part 2, if someone could take a look and help me out I would really appreciate it. Thanks. I am required to implement an array to store, monitor, and retrieve data for camera inventory. [CODE]// Fig 2.4: …

Member Avatar for coil
0
136
Member Avatar for KirkPatrick

Alright well I decided I wanted to widen my learning a bit with java and decided I was going to write a program that had to do with networking side of things. It took me a little bit of time to come up with something, so I asked my friend …

Member Avatar for toseo
0
225

The End.