35,618 Topics

Member Avatar for
Member Avatar for rotten69

G'day everyone, I just have a few questions about Java programming language. Before getting started with the question, I was actually doing some reading for my java course and there was an implementation of Coffee vending machine in java. Therefore, the questions came to my mind and these are: Do …

Member Avatar for peter_budo
0
201
Member Avatar for dantinkakkar

I need assistance in printing out a Quine. I googled it and stuff, but I didn't understand the code snippets I saw. Can anyone explain in a more lucid tone?

Member Avatar for peter_budo
0
128
Member Avatar for dhija22

HI everyone,i am a biginer in java and i need your help...i have write a prgram but i cant execute can anyone help me for execute it the program is : package sensor; [CODE]public class sensor { private String Id; private int Kordx; private int Kordy; private char[] getId; public …

Member Avatar for dhija22
0
410
Member Avatar for dhija22

HI everyone!I am a beginner in java and i need your help,please if u can help me i have write this code : [CODE]package person; public class person { private String Name; private String Birthday; public person (String name,String birthday) { super (); Name=name; Birthday=birthday; } public String getName() { …

Member Avatar for NormR1
0
121
Member Avatar for sirin_adam

Hello! I have write a program on Java. This Java program creates a file which have C code for Windows. I need to compile everytime this C code by copying it to another IDE. Can i do this compile process from java program? (C code is very simple and it …

Member Avatar for sirin_adam
0
217
Member Avatar for thompsonSensibl

Hello there. Could you give some insightful input into my problem: My program is fed multiple lines of input. The input is composed of a name and two values of that person. Each line is of a new 'person' e.g. "James 23 15.05 Lucy 51 25.523 Kam 42.4 21.54 Jak …

Member Avatar for JamesCherrill
0
134
Member Avatar for superjj

I'm trying to learn java. Now I want to test the buttons, but I don't understand the part of the layout. Can't I just write button1.setLocation(50,50); or someting like that ??? Thanks in advance.

Member Avatar for JamesCherrill
0
102
Member Avatar for thompsonSensibl

Hi there, I am not good with Java. Can someone explain this for loop for me please. For a for loop, to my understanding the syntax goes something like, [CODE]for(int i = 0; i < someNumber; i++) { //...some code... }[/CODE] but in this one I have seen, the for …

Member Avatar for peter_budo
0
144
Member Avatar for marsangel

HI! Can someone help me regarding my USB and a Java program. So I have created a Jar file where there is a login form. I have my USB that is partitioned in two. What I want to happen is before I open one of the partitions, my Login form …

Member Avatar for marsangel
0
104
Member Avatar for naffan

Hi all, Wonder if someone could please lend a hand, I have a courses.txt file which is read into a Course String array I also have a program.txt (A list of 8 courses required to pass the program) There's a menu option to change the Program, however a condition of …

Member Avatar for JamesCherrill
0
216
Member Avatar for dahaka

Hi I'm new to GWT and I am learning using the GWT plugin for eclispe and also have smartGWT. I have found afew tutorials online which have been very helpful but havent found one that explains how I can connect, send, recieve and display database information in the different widgets. …

Member Avatar for peter_budo
0
480
Member Avatar for Vongola_Takeshi

Good Day! My professor in object oriented programming wants us to collect a JFrame form to a class.... he told us the code but it did not work...Hope you may help me...and thanks in advance [code]import javax.swing.JOptionPane; public class Firm { //---------------------------------------------------------- // Creates a staff of employees for a …

Member Avatar for Vongola_Takeshi
-1
9K
Member Avatar for Majestics

Is there any method in java to know size of decimal?? I mean 14 has 2 digits , 100 has 3 etc....... I m going to implement auto generated number like A0001 , now i want to change it on each new entry , so Does any one has any …

Member Avatar for Majestics
0
118
Member Avatar for naffan

Hi All, I am trying to load from a .dat file a collection of student objects However on load it only loads the first student and then stops I've tried to put print messages in but with all the nulls I really can't seem to work out what is happening. …

Member Avatar for naffan
0
163
Member Avatar for jhopwood

Having some issues figuring out how to code my add, modify, search, delete, and save buttons in my program. The buttons need to also adjust the size of the array once I add or delete the an item. Any help would be great. I may be going about this the …

Member Avatar for NormR1
0
327
Member Avatar for dhija22

Hi everyone!i am beginner in java,i have write a program but i can compile it successfully can any one help me please...te code is [CODE]package sensor; public class sensor { private String Id; private int Kordx; private int Kordy; private char[] getId; public static void main(String[] args) { sensor ob=new …

Member Avatar for JamesCherrill
0
118
Member Avatar for aman rathi

In my program i want to execute same statement on case 3 and 5 in switch() i searched lot on google about this but get nothing please help me [CODE] case 3,5: [/CODE] I know it is wrong but if you have any idea about this than please help me.

Member Avatar for aman rathi
0
100
Member Avatar for PROgamer
Member Avatar for uid1

I have the following XPath expression written in Java: [CODE] " pProbs = XPath.newInstance(/n-grams-sorted/n-gram[contains(.,"+content1+") or contains(.,"+content2+") or contains(.,"+content3+") or contains(.,"+content4+") or contains(.,"+content5+")]/@probability"); [/CODE] My problem is that not all of the contains() expressions return true. What I need is: If one of them returns 'false' (i.e.: there are no nodes …

Member Avatar for uid1
0
214
Member Avatar for dantinkakkar

I'm writing a java program that adds event handlers dynamically on the go on instructions by the user. My problem is, that how do I basically add them?

Member Avatar for peter_budo
0
143
Member Avatar for vishal1949

I just wanted to know what would happen if you abuse the CharStack class by pop()ing more characters than you push()? Would it be an error of out of exception or something else.

Member Avatar for JamesCherrill
0
224
Member Avatar for naffan

Hi All, I've a little problem with writing and saving to a file I'm close but I can't seem to grasp what i'm doing wrong here. Trying to save student object(s) to allstudents.txt This is my loadStudent method; [CODE]public student[] loadStudent() throws IOException, ClassNotFoundException //loads the accounts and returns them …

Member Avatar for naffan
0
174
Member Avatar for tkit1110

Hi, I am supposed to develop a Voicemail System for my data stuctures class, so to record and playback messages, I was told that I would need to use the Java Sound API. However, after reading the little tutorial on Java, I am still a bit lost as to how …

Member Avatar for harinath_2007
0
191
Member Avatar for xinwei

Hi all, I'm doing a elevator simulation project but i met some issues. First, I wish to align my buttons on the left to the horizontal lines. I tried to setting setMinimumSize, setMaximumSize, setPreferredSize but it didn't help. Second, if I re-size the window, the buttons on the left seems …

Member Avatar for xinwei
1
755
Member Avatar for varun45

Hello i am needing advice about a project that i have got. Its about traffic light using wireless sensor simulation. I want to know about the different softwares that can be used to work on such application, i mean the simulation part. I tried google but apparently i dont really …

Member Avatar for peter_budo
0
164
Member Avatar for sheennave

Hi! I am new in hibernate annotations so i am practising it on the console. In here i am using hibernate3.jar(came with Hibernate 3.5.1), hibernate-annotations-3.4.0.GA.jar etc. However when i run the main the application didn't start and following errors were generated. Any idea,please help.. !?? 0 [main] INFO org.hibernate.cfg.annotations.Version - …

Member Avatar for sheennave
0
1K
Member Avatar for sathya88

hi, am try to create a simple jar file... i got some error to run that jar file error =" Failed to load Main-Class manifest attribute from bala.jar" my code: [CODE]import javax.swing.JOptionPane; public class hello{ public static void main(String args[]){ String s= JOptionPane.showInputDialog("enter name plz...."); JOptionPane.showMessageDialog(null,"hello "+s); } }[/CODE] here …

Member Avatar for sathya88
0
159
Member Avatar for bibiki

Hey there, I have taken earlier this tutorial on adobe's site for building an application for mobile devices. The tutorial provides a war file. After deploying the war file on my tomcat server, a few directories are built. Most importantly, WEB-INF folder. This folder contains some java files on one …

Member Avatar for bibiki
0
92
Member Avatar for sheennave

Hi ! I've been trying to use hibernate with spring framework for a week by using hibernate annotations. I am using hibernate-distribution 3.6.5 final and Spring framework 3.0.5 in the application. Error log and code is here :[URL="http://www.daniweb.com/software-development/java/threads/378043"]http://www.daniweb.com/software-development/java/threads/378043[/URL] I wait for some suggestions. Please hlp !

0
73
Member Avatar for muff1n

Hi all, I'm about to start on my Java course next semester. Since I've only coded in C/C++ til now, I'm a bit stumped. I'll give you an assignment from last year, maybe some of you guys can show me how this program would look like in Java. Here goes: …

Member Avatar for muff1n
0
179

The End.