35,618 Topics
![]() | |
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 … | |
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)); … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
anyone knows how? if its empty or null? events.get(x).getOccurredDate() == null thats not working. neither events.get(x).getOccurredDate().equals("") | |
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? | |
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 … | |
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 … | |
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 = … | |
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 | |
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........... | |
I don't know how to write marquee with links in java application.If someone knows, pls help me. | |
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 … | |
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 … | |
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 = … | |
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 … | |
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"); … | |
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?? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) + … |
The End.