32,199 Topics

Member Avatar for
Member Avatar for winecoding

For the computation involving multiple types of variables, such as integer and double, is the following approach the correct way in terms of not causing any hidden error or information lost? [CODE] int a = 2; double b = 3.0; double c; c = (double)(a+b); c = (double)(a/b); [/CODE]

Member Avatar for jon.kiparsky
0
234
Member Avatar for naffan

Good morning all, Hopefully a quick solution, I've done some reading up on taking command line arguments and I almost have it licked, but I'm running into some trouble trying to send into a method.. I'll give you an example of what I mean Let's say I want to send …

Member Avatar for naffan
0
388
Member Avatar for KAY111

Hey, I am writing this program in which I get x and y coordinates on stdout from a C program.....something like 23 34 45 56 21 56 .. . and so on.... now I need to pipe these values into a Java program and display a cube at the corresponding …

0
113
Member Avatar for Rune911

I'm trying to use Java to echo a command to another shell, but I have had no luck doing so so far. [CODE]echo xcommand | /usr/bin/tshell[/CODE] In the linux shell this is processed as echo xcommand to the tshell shell and works properly. In java all it does is echo …

0
48
Member Avatar for lili.edryana

[CODE]RpcProxy<PagingLoadResult<BaseModel>>[/CODE] Hye guys. I would like to know what is the meaning of [B]<>[/B] in the statement above? What I mean is something like <BaseModel>. What is this? When is it going to be used? Thanks

Member Avatar for NormR1
0
105
Member Avatar for syeda amna

hi is there any difference between servlet and HTTP server. I want to develop client server model (two tier) please help. how to do it?

Member Avatar for syeda amna
0
206
Member Avatar for trivax

hey there.. i m a begineer in this java.. i m developing a simple database program to keep records of patients for a small organization in netbeans 7.0 beta. i havn't developed the whole software.. when i test, it doesn't gives errors at first.. when i press the add record …

Member Avatar for trivax
0
145
Member Avatar for naffan

Hi all, I'm just finishing the code part of an assignment I think I have everything working as intended with the exception that After either the prime number or stamp duty methods complete (A & B options) they don't "flush" the char choice (under the getChoice method ) The vowel …

Member Avatar for JamesCherrill
0
5K
Member Avatar for zhealz12

guys please help me ./.... what is the meaning of scanner and what is the uses of import java.util.scanner? need some help......

Member Avatar for NormR1
0
119
Member Avatar for aiwasen

Hi!I'm new in java so I really need your help. The problem is how do I return a value if I made another choices again and again.. here's the expected output: Enter size of class: Choose Action: [1]Enter a Student [2]Enter list of student [3]Exit Enter choice[1-3] I created some …

Member Avatar for peter_budo
0
156
Member Avatar for akasekaihime

[COLOR="Green"]Can you spot what is wrong with the java code that I am doing. Here is the java code that I have been working on...[/COLOR] [CODE]import java.io.*; public class Konata { public static void main (String args []) { BufferedReader br=newInputStreamReader(System.in); int grade,answer=0; do { System.out.print ("\n Enter grade"); grade=Integer.parseInt(br.readline()); …

Member Avatar for ztini
0
108
Member Avatar for winecoding

In the code, I have [CODE]int a = 62; int b = 132; double c; c = a/b; [/CODE] This will generate the c value in the double format as 0.469696968793869 In fact, I only need to an approximation representation of c like 0.4697 Can you let me know how …

Member Avatar for ztini
0
94
Member Avatar for akasekaihime

[COLOR="Green"]can anyone teach me how to make a java code out of this situation?[/COLOR] [COLOR="green"][B]here is the situation...[/B][/COLOR] [COLOR="Red"][B]Write a program that accepts 3 integers and display the highest and lowest input. N1=100,N2=200,N3=50.[/B][/COLOR] [QUOTE][COLOR="Green"][U]Thank you![/U][/COLOR][/QUOTE]

Member Avatar for peter_budo
0
163
Member Avatar for nattienat7

Hello, Thank you in advance for taking the time to help me!! My assignment is to write a dice game in java using the Die.java class.The object of the game is to reach a total of 41 or more by rolling a pair of dice no more than 6 times. …

Member Avatar for ztini
0
557
Member Avatar for student.09

Hi Everyone, I just need a little bit of help figuring out what i'm doing wrong in my code that the salary keeps output as zero. I'm writing a code that is suppose to determine whether the employee is a staff or faculty and then calculate and output the salary. …

Member Avatar for NormR1
0
159
Member Avatar for Dean_Grobler

Hey guys, Okay, tough one. How exactly would we go about integrating Biometric scanners (e.g. fingerprint scanners) with our software? The way I see it, the scanner scans a finger print, and then saves that data in a database, but what data is this? What file type? This is probably …

Member Avatar for rubberman
0
160
Member Avatar for iwannalearn

I have recently started jdbc nd now i am confused that what is the real purpose of Class.forname() method?? Also what is the diff. between Class.forname() and DriverManager.registerDriver()?? plz reply soon

Member Avatar for NormR1
0
592
Member Avatar for plasticfood

i don't know what happened, but i was running an applet that i made on a webpage and it works fine. i have the latest JRE and i am running firefox 4. then i've made some changes to the applet, tested it, it works, and copy and paste the class …

Member Avatar for plasticfood
0
324
Member Avatar for JamesCherrill

Just a heads-up guys. I had JRE update 26 pushed onto client machines yesterday and it broke an important client-server app. This point release changes the serialVersionUID for ImageIcon. The app in question sends images from the server to the cients via a simple writeObject/readObject, which fails at the client …

Member Avatar for Don Corley
1
558
Member Avatar for gingerfish

i have this dataset: [CODE]String[][] trainData= { //featIdx////////classInfo {"s", "y", "r"},//0 {"s", "n", "r"},//1 {"w", "y", "r"},//0 {"r", "y", "p"},//0 {"r", "n", "r"},//2 {"r", "y", "p"},//0 {"w", "n", "p"},//0 {"w", "n", "r"},//3 {"w", "y", "r"},//0 {"s", "n", "r"}};//1 int[] trainClassInfo = {0, 1, 0, 0, 2, 0, 0, 3, 0, …

Member Avatar for gingerfish
0
919
Member Avatar for newcoder310

Hi , I'm new to servlets and I'm trying out the Date function in servlets. Instead of printing todays date it is giving something like "Date@fbb7cb" this . Could you please point of my mistake .... Following is the code snippet [code] PrintWriter pw = response.getWriter(); Date today = new …

Member Avatar for NormR1
0
114
Member Avatar for EneilShade

Hello DaniWeb community! I am writing code for problem 10 of Project Euler. I have decided that the Sieve of Eratosthenes was the best option for creating a list of primes less than two million. Here is my code (yes, I mis-spelled Sieve and Eratosthenes): [CODE]package projecteulerjava; class ProblemTen { …

Member Avatar for JamesCherrill
0
215
Member Avatar for riahc3

Hey Im writing a platform game "Mario style" for mobiles in Java but I seem kinda stuck. Any recommendations on some points I should do? Ill view them and post code Ive done related to them. To recap some of the things done: Map loads I can "move" (what actually …

Member Avatar for ztini
0
42
Member Avatar for cretaros

Im to develop a payroll calculating system using abstract classes and implementing polymorphism, With respect to inheritance of super class Employee by sub classes. i dont know how to start implementing it on GUI, bt its okay on cmd. Any help either with sample code is highly appreciated. cretaros.

Member Avatar for ztini
0
157
Member Avatar for masterofpuppets

Hi all, I am writing a server in Java and I have an issue which I've been working on for days now and I can't seem to find a solution. I want to upload files to the server using an HTML form. I can read the whole POST request and …

Member Avatar for masterofpuppets
0
218
Member Avatar for IIM

I have tried a lot for JDBC using mysql but none of them work.... Can anyone help me how to get this work.... [CODE] import java.sql.Connection; import java.sql.DriverManager; public class Main { public static void main(String[] argv) throws Exception { String driver = "com.mysql.jdbc.Driver"; String connection = "jdbc:mysql://localhost:3306/abc"; String user …

Member Avatar for IIM
0
119
Member Avatar for aiwasen

hi everyone!!pls help me.. here's the problem -Create a program that will input a list or array of number and arrange them in ascending order.Then search a target.. please help me to program this in java!!

Member Avatar for aiwasen
0
161
Member Avatar for Feriscool

I used JFormDesigner to create a GUI, and now I need to find out how I can export it so that it's a use-able program with just one click. Here's the code (not sure if you'll need it): [code]import java.awt.*; import java.awt.event.*; import javax.swing.*; /* * Created by JFormDesigner on …

Member Avatar for mKorbel
0
222
Member Avatar for warlord902

I am developing a desktop application in Java which provides chat function to users. I am using smack API and I am using X-Facebook Platform for logging in. I have developed a class which can connect to facebook and authenticate if session key available. But I can't figure out how …

0
101
Member Avatar for pro_learner

Guys i have created a simple Java Desktop application in netbeans.I want to connect it with SQL server 2008.I want to know how to connect it by using ODBC.Plz help me.....

Member Avatar for pro_learner
0
109

The End.