35,618 Topics

Member Avatar for
Member Avatar for bennettgirl99

So I have spent some time on this.... Write a program named TrafficLightcontroller Program should have a main method Construct three TrafficLight objects named:light1,light2,light3 Repeatedly print a menu that allows a user to type in responses and control the three lights. Menu: Select traffic light (0 to quit): 1 1)change …

Member Avatar for quuba
0
157
Member Avatar for asong

have a java program that have evaluate thefunction,calculate the derivative and roots haw can i demonstrate numerical methods to solve the runge kutta method. This ma functiuon package Iterative.Newton; import java.io.*; import java.text.DecimalFormat; public class Newtonlastest { public static void main(String[] args) throws Exception{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); …

Member Avatar for quuba
0
675
Member Avatar for mamanbadry

Hi, I am a new user of Fedora. I should work with an open source package which works in Linux. Therefore, I installed Fedora 11. At the moment, I must install Apache Ant to continue. However, I am confused! I don’t know how. I appreciate if you tell me the …

0
109
Member Avatar for sridhar123
Member Avatar for sridhar123
Member Avatar for feoperro

Hi, I would just like to know if it's possible to ping a certain port from a jsp page. For example: If I had a Apache_Status.jsp on my machine and I wanted to ping it on another machine at: 123.456.78.90:8080 And I had a Glassfish_Status.jsp on my machine and I …

Member Avatar for feoperro
0
373
Member Avatar for skiplatte

Hi, I have used Tokenizer to split a user input string into tokens and retained the delimiters (R and K). Is there any way to combine each delimiter with it's preceding token to create a result string? eg change tokens FGADA and R into one string FGADAR which I can …

0
53
Member Avatar for Java-newb

I am a student really struggling with Java and needless to say, I am pretty isolated from anyone who gives a care enough to help me, I am on my 8th week and really struggling with GUI's I have some code written, but the gui will not display, I am …

Member Avatar for Java-newb
0
173
Member Avatar for hajjo

anyone knows how? if its empty or null? events.get(x).getOccurredDate() == null thats not working. neither events.get(x).getOccurredDate().equals("")

Member Avatar for masijade
0
94
Member Avatar for Mareshal

I have a program with multiple JAR files. I need to edit only 1 class in only 1 jar file. I've decompiled them to *.java files, edited, but I can't recompile them. I tried javac name.class but I get a ton of errors. any help?

Member Avatar for Mareshal
-1
212
Member Avatar for Maverick

I am finishing up writing an extensive C/C++ program and am in dire need of completing these 4 short JAVA programs. Any help would be appreciated GREATLY! (I missed a few days of lecture and am extremely behind in this class.. :sad: EDIT: actually just helping me with one or …

Member Avatar for javaAddict
0
644
Member Avatar for Holmez85

Hi, im pretty new to java. Im attending a programming class at a college in norway. I have only been programing for 3 months. My question is, how can i for example print all items or a selected item from the games archive(so i get it in a new window …

0
82
Member Avatar for bigginger

I'm new in programming and need to validate this class email. Anybody can help? public class Email { private String email; public Email() { email = ""; } public Email(String emailAddress) { this.email = emailAddress; } public String getEmail() { return email; } public void setEmail(String email) { this.email = …

Member Avatar for bigginger
0
105
Member Avatar for ashokp27

We are currently using MSJVM for JVM, and there are some class files for tuxedo application.... Now as MS as has stop MSJVM support we want to move form MSJVM to SUN JVM. Please some one guide us, how to use existing class in sun java

0
41
Member Avatar for mohs_cool

hi i am sadiq doing my final yaer in the disciple of information technology ... As i am interested in doing my final year project in java ....... i need the suggestion to select a interesting project which should impress the company.. i also need the project description...........

Member Avatar for peter_budo
0
391
Member Avatar for Sandar Khin

I don't know how to write marquee with links in java application.If someone knows, pls help me.

Member Avatar for Sandar Khin
0
114
Member Avatar for rajuchacha007

Hi all, I am using maven for building deployable artifacts. Whenever I run mvn deploy command, error occurs. I am also using nexus for the actual artifact deployment. Cause: Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated Both pom.xml and settings.xml are modified accordingly. No issue about it. But still I am getting …

Member Avatar for peter_budo
0
100
Member Avatar for alsoumhi

Hi experts, I am having very small error with my attachment file. the thing is , if I let my servlet send e-mail fwith attachment file exists on my computer and that file I edit by myself , there is no error with my file , so if i download …

0
92
Member Avatar for ShuiYinDeng

oldAccount text file is Nicholas, Diana, Eric,Andy, Alex , AMy CurrentAccount text file is Andy Alex Amy Kelvin cherry Betty import java.util.*; import java.io.*; public class Example2 { public static void main(String[]args) throws IOException { System.out.print (" Old Account is: "); System.out.println(); TreeSet<String> oldAcc = new TreeSet<String>(); Scanner oldacc = …

Member Avatar for ShuiYinDeng
0
152
Member Avatar for M.Jama

Hi there, I am new in java and some basic help would be appreciated. e.g 1-What's the out put of; double number = (1/3)*3; System.out.println("(1/3)*3 is equal to " + number); What's missing? 2- Convert each of the following mathematical formula to java expression; 3x and 3x+y Thank you in …

Member Avatar for M.Jama
0
87
Member Avatar for camilia

hi, does anyone know how to do login validation using java...here is my code,bt i cant validate if the username and pw typed are the user in the database. (The java code that i wrote) [CODE] public int Login(Friend fr) throws EventException { Connection con = null; System.out.println("Database connection succeeded"); …

Member Avatar for javaAddict
0
96
Member Avatar for jrosh

I used below code to extract year from a date object. [CODE] java.util.Date ye = new java.util.Date(); int y = ye.getYear(); System.out.println(y); [/CODE] But it prints ,109 How I get the year as 2009??

Member Avatar for jrosh
0
227
Member Avatar for isuruj

I am using emma-2.1.jar for getting code coverage for my java web application. For generating the coverage.ec file, every time I need to shutdown the tomcat server. But I heard that version 2.1 gives ctl tool for getting coverage.ec file without shutting down the server. But I don't know how …

0
60
Member Avatar for vtsmokey88

So i've converted a float array and int array into binary number. The problem is when I print out the binary values, java cuts some of the digits off depending on how much the value is. I've found this to be a problem with the int value because they don't …

Member Avatar for masijade
0
95
Member Avatar for swinefish

Hey all I'm writing a rasterizer at the moment, and one of the basic transformations you can perform is rotation. This demands the use of trig functions. However, when rotating a cube, my cube slowly shrinks. Is this s result of loss of accuracy in Math.sin() and Math.cos()? Or is …

Member Avatar for mrnutty
0
128
Member Avatar for DazednAngry

I am working on an assignment and I need a bit of help. I am using a double linked list to find roots of polynomials, the list has a trailer node only. I can't seem to get it to create a list. I figure I am just missing something small …

Member Avatar for BestJewSinceJC
0
129
Member Avatar for Logi.

Evening Folks, Having a bit of a problem with somthing i am trying to code, wondering if anyone here can help.... The basic idea is that i am trying to build a Priority Queue of binary tree nodes so that they are stored in ascending order by a number stored …

Member Avatar for quuba
0
884
Member Avatar for Karkalash

Hi: I have to write a program generating the fibonacci sequence based on the length desired by the user. I'm using arrays and methods too. So I have to do one method to generate the sequence and another to print the other method. So far so good, except the last …

Member Avatar for dotaa
0
2K
Member Avatar for runee1000

Hi, I just started learning java, so my skills are quite limited and I have yet to learn many many concepts. Right now, I am trying to create a hangman game(which as you can see is still incomplete). The problem I get is, the word being "mystery" when I guess …

Member Avatar for BestJewSinceJC
0
134
Member Avatar for anki.gulsvart

Hi. I´m trying to change a file-extension, but it doesn´t seem to work. When i use System.out.print() it says the new name, but the file in my computer doesn´t change. My code: [CODE]public String changefileextension(String filename) { int lastDot = filename.lastIndexOf("."); if (lastDot != -1) { filename= filename.substring(0, lastDot) + …

Member Avatar for JamesCherrill
0
77

The End.