36,051 Topics

Member Avatar for
Member Avatar for codered152

hi guys i need help with list collection in java can somebody give me some good example of how to iterate over list, also explain little bit. Thank you

Member Avatar for ~s.o.s~
0
100
Member Avatar for darthrevan

For learning socket programming this program is a nice tutorial , IpShower can show you a site ip adress , inform you whether you connect through a proxy server or not , if you connect a proxy , program tells you its information.Also , it can simply change the system …

Member Avatar for stultuske
0
36
Member Avatar for bimpok

I am going to develop a roadway traffic light simulator using java as my academic project. I have captured ideas about so from searching internets .I have to build a system which simulates a traffic network and the traffic flow is regulated using a fixed time controller first and then …

Member Avatar for stultuske
0
141
Member Avatar for ming97

Dear All, I am interested to study java programming, I am collecting some sample of program. do you have a sample program of TicTacToe game? I need a sample that the tictactoe program have a function for play between server and client. The board of tictactoe will exist on them. …

Member Avatar for ~s.o.s~
0
101
Member Avatar for Kakashi

Hello there, im doing a small program just like a packet sniffer but i have a one problem.Below are the codes which are used to list all the network interfaces and the output will be something like this: 1.Interface Name's: lo / MS TCP Loopback interface Address: 127.0.0.1 2.Interface Name's: …

Member Avatar for masijade
0
246
Member Avatar for lordx78

I doing a project about Genetic Algorithm (GA). I'm looking for some book that shows GA in Java. Please advise. [COLOR="Green"]Books[/COLOR] [COLOR="Red"]Websites[/COLOR] [COLOR="Green"]Journals[/COLOR] [COLOR="Red"]White Papers/ Publications[/COLOR]

Member Avatar for dickersonka
0
132
Member Avatar for yawjava

Hi am new at java and I was wondering what would be a code to remove it if i provide the coeff I know is -Given the index you want to remove -set the node at the previous index to point to the node at the next index -set the …

Member Avatar for BestJewSinceJC
0
199
Member Avatar for bahr_alhalak

HELLO every one:) >> could any one help me to solve this program :icon_neutral: >> and explain it to me >> download the file bellow ....:$

Member Avatar for dickersonka
0
269
Member Avatar for Astudent

So I am getting into the swing of python in my class, and am currently trying to take a program from an example, and making it much more condensed. The issue I am having, is there are many classes for a tkinter guessing game. [ICODE]def question5(): if entry5.get() in ["Samus", …

Member Avatar for tyincali
0
128
Member Avatar for mrjoli021

What is wrong with my code. it poulates the arraylist with only the filename "c:\testfile.txt" i need it to populate it with the contents of the file. [code] private ArrayList<String> Files2Delete = new ArrayList<String>(); private String fName = "c:\\TestFile.txt"; private void fileCollection () { Scanner in = new Scanner(fName); int …

Member Avatar for dickersonka
0
95
Member Avatar for Kakashi

Hello.. I need help urgently on how to save an output from the command prompt using the BufferedWriter bw= new BufferedWriter(new FileWriter(".text",true)); a little help i much appreciated and Thank you =) regards Kakashi

Member Avatar for peter_budo
0
104
Member Avatar for janamrob

Hi, I have a class MovieRating below: [code] import java.util.*; public class MovieRating { private Map ageMap = new HashMap(); private String movieRating; public MovieRating() { ageMap.put("PG", 18); //parental Guidance ageMap.put("G", 4); //general viewing ageMap.put("A", 27); //Adult material } public String getRating() { return movieRating; } public boolean getStatus(String rating, …

Member Avatar for stultuske
0
122
Member Avatar for Achupa

Can someone help me modify the code below to do the following: Ensure that your mammal has a [B]private property which is an collection of limbs[/B] and [B]protected methods to add, remove and retrieve the limbs[/B]. You need to pass a limb not a list to the methods for adding …

Member Avatar for dickersonka
0
153
Member Avatar for No1unoin98

Hello everyone, newbie here, im getting an "illegal start of expression" where the while loop starts but im not sure whats wrong with it. I would really appreciate it if anyone could help me as i understand most of the concepts of java but have a hard time writing the …

Member Avatar for No1unoin98
0
93
Member Avatar for tigerkartik

hi i m plannin to build a gaming web site using java. so basicaly i want to know where to start from and the things i need to consider and are concerned for the same.

Member Avatar for ithelp
0
88
Member Avatar for niozect

Hello.. I am new here and hope that u can help me to solve my problem in java programming. Actually I am doing my final project titled as Presentation Tools (PT). This project is similar to the Microsoft Power Point and also OpenOffice. The problem now my PT didn't have …

0
54
Member Avatar for paul_1234

Hi, I'm currently working on concerning a student record with guardians/parents... im using the java ee framework.. I'm having problems on retrieving the data on our database(MySQL).. Here is what i did.. i have created a class to retrieve those data from the database.. my problem is that whenever i …

Member Avatar for ~s.o.s~
0
110
Member Avatar for intelli

can any help me with this while loop it should follow a maximum of 40 regular hours, a maximum of 20 overtime hours, and a maximum of $10.00 for the hourly pay rate. evertime i put my while loop in the code and run it , it doesnt do anything …

Member Avatar for destin
0
92
Member Avatar for Grub

I have a .jar file; in this .jar file I have many .class files but no .java files for these class files. Is it possible to add functionality to the program? If so how?

Member Avatar for Grub
0
125
Member Avatar for guilhermegrg

Tabula is a Java Web Framework, comprised of several subprojects, such as a server and GUI tools. Right now there is an early alpha version of the server and REST editor available. The framework is based on SOFEA, removing the UI responsibilities from the server to other applications. The server …

0
50
Member Avatar for java-clueless

I understand arrays pretty well but I am so stuck on where to put it. Everything I enter into the inventory program seems to be in the wrong place or written the wrong way. I am so confused can someone help me? This is the program I have so far, …

Member Avatar for java-clueless
0
211
Member Avatar for cproud21

I have written the following class, and demo, in which I used a default exception (InvalidInputException)... I ran it, and it worked. So I tried my own exception, which I cannot get to work. How do I change the exception that is taken to my own (the Invalid TestScore class)? …

Member Avatar for Ezzaral
0
139
Member Avatar for askhan

[code] public int getMathInformation(int a, char op, int b) throws RemoteException { int result = 0; if(op == '+') result = a + b; else if(op == '-') result = a - b; else if(op == 'x') result = a * b; else if(op == '/') result = a / …

Member Avatar for dickersonka
0
82
Member Avatar for BestJewSinceJC

I'm confused how GridBagLayout can be used as if it was GridLayout(0,2). For example, I would like to lay out components like this: Label TextFieldForLabel Label TextFieldForLabel Label TextFieldForLabel Label TextFieldForLabel I thought by making a GridBagConstraints() Object, then setting the gridx and gridy variables, this could be accomplished (Java …

Member Avatar for Ezzaral
0
110
Member Avatar for NotThereAnymore

I am working on modifying a BankAccount class for a project I'm doing. I am almost finished, but I am stuck on my second constructor. If a user has an existing account (i.e if there is an initial balance), then the BankAccount constructor should call a deposit method to allow …

Member Avatar for dickersonka
0
98
Member Avatar for cproud21

I am trying to write an exception to throw, for an invalid testScore array. If the scores are greater than 100 or less than one. I attached the three classes I have created. I also have to return the average.... If anyone can help I would appreciate it. I am …

Member Avatar for Ezzaral
0
153
Member Avatar for Achupa

Hi, I have a Cinema class as shown in the code below. However I'm required to create my own exceptions and pass them to the controlling module (here method with scenarios). After an exception occurs the code should stop execution of current scenario and go to another one. The code …

Member Avatar for orko
0
132
Member Avatar for JCortes

Hello, I'm building a telephony application and I hava a Javabean with a prperty named callerID, which is updated each time a new phone-call is arriving to my PC. My headache is how to show callerID value in a JSP page. I suppose that I need to use Javascript, but …

0
51
Member Avatar for Achupa

Hi, I have a small question regarding arrays. I have the class Family below: [CODE] import java.util.ArrayList; import java.util.Collection; import java.io.*; public class Family { private Adult father; private Adult mother; private Child[] children; private Dog ourDog; private Cats ourCat; private Rabbit ourRabbit; int Age; public Family() { } public …

Member Avatar for ~s.o.s~
0
132
Member Avatar for vedmack

Hi Im writing a web application nad I have a web page in which an actionListener is being activated after a click on h:commandButton, the problem is that the execution of the actionListener taking to much time... and after a while im getting a timeout from my proxy although the …

0
63
Member Avatar for IMtheBESTatJAVA

I was asked for my AP Comp Sci online course to construct a program that would calculate fahrenheit to celsius and vice versa, the volume of a sphere given the radius, and the hypotenuse of a right triangle given the two other sides. I was given a program to work …

Member Avatar for IMtheBESTatJAVA
0
517
Member Avatar for joshmo

Hey all. I would like to find out how i can access/ get the value of a variable in a different class. this is part of the code which shows what I was trying to do. [code] public class A{ protected int x; //missing code C obj = new C …

Member Avatar for joshmo
0
141
Member Avatar for Rawrtistic

[B]HELLO There, I am in need of some help for my homework. I am doing the AP Computer Science Lab A10.1 StringUtil an In need of some help. How do I do Number 2? Create a method that receives a string and returns a string that is the exact reversal …

Member Avatar for stultuske
0
165
Member Avatar for ranam

generating triples for branching statements related to compilers lo intermediate code generation in that we have3 address code triple is one of the type of 3 address code little bit urgent can any one solve this i need to complete my assignment plz

Member Avatar for ~s.o.s~
0
115
Member Avatar for cwarn23

Hi and I must know if this script is valid to determine if the Java console and my Java compiler need reinstalling. I have tried so many samples and my browser shows an invalid message. My file is named 'filename.class' and below is the script I have used to test …

Member Avatar for cwarn23
0
474
Member Avatar for ming97

Dear All, I have a problem with Java Programming. I am writing a TatTicToe Program but I found a Error. It is a [B]unexpected type[/B] for [B]mark.equals("X")? currentPlayer=1: currentPlayer=0;[/B] I don't know what happen. If you don't mind , I hope that All people will give some advises to this …

Member Avatar for darkagn
0
94
Member Avatar for Spartan552

Hello everybody, I have various components that I want regroup in the same category. I found numerous screenshots on the internet using some sort of frame surrounding items. For instance : [url]http://www.vieartificielle.com/images_robot/e70d6615e7b9c9ecfacdc7e977425d6d/cache_500_wifi_robot_photo_gui.jpg[/url] (the frame surrounding "Joystick information" section) and [url]http://bp3.blogger.com/_45gEBj4xUTA/RwefQvOgIjI/AAAAAAAAACQ/pKezYz2qQCQ/s320/RobotUI.jpg[/url] (the frame surrounding "Current data" section). I dont know how …

Member Avatar for Spartan552
0
99
Member Avatar for yawjava

I have a code to add a node...what would be a code to remove it if i provide the coeff [code]public void addNode(int coeff, int power) { if (head == null) // start the list { head = new Node(coeff, power, null); degree = power; } else { Node n …

Member Avatar for BestJewSinceJC
0
87
Member Avatar for joshmo

I was reading a tutorial about 2D arrays and I decided to construct something. I managed to construct something but when I compile I get "null" as my output. I cant seem to figure out the problem. Here is the sample code. I have also higlighted in red a line …

Member Avatar for ~s.o.s~
0
594
Member Avatar for jjskywlker

Ok, so I need to enhance the functionality of my existing Loan class to be able to calculate any of the 4 missing elements in a Loan, whether it is the Principal, APR, Term, or Payment. I already have the necessary calculations to get the monthly Payment, but I need …

Member Avatar for stultuske
0
4K
Member Avatar for AdventureX

Hey, I am trying to complete a learning exercise for a rocket program. I already have a Rocket Class but I also need to have a new class to run the rocket program. So far I have wrote [CODE]class RocketTest{ public static void main(String[] args){ Rocket varName = new Rocket(); …

Member Avatar for ~s.o.s~
0
90
Member Avatar for itzzmeyoyo

Iam not able to pass a value from servlet to jsp using setAttribute and getAttribute. My test code : Test1.jsp ======= [code] <%@ page language="java" contentType="text/html" %> <html> <head><title>Login Example</title></head> <body> Enter Your Text <hr><p> <form name = login action="../servlet/TestServlet1" method=POST> Your Text : <input type=text name=yourText><br> <input type=submit value=LogIn> …

Member Avatar for ~s.o.s~
0
3K
Member Avatar for chandanseparate

hi, This is chandan singh from India , studying and working part time to create and helps to create computer software.

Member Avatar for zeroth
0
28
Member Avatar for arunmagar

I have developed web application I m using java beans file to set the values when user login to the system. It set the values of the user. I uses that value in application Whenever the login code calls the beans values are set with new user. The existing login …

Member Avatar for peter_budo
0
66
Member Avatar for hlmrjr

I have a query I am currently working on a program with a lottery theme I will post the parameters as well as my code thus far. A lottery requires that you select six different numbers from the integers 1 to 49. Write a Java program that will do this …

Member Avatar for afzal_01
0
138
Member Avatar for briguy75

I'm doing a homework assignment... I have two files. Payroll (the class) and myPayroll. I run myPayroll and it does everything except return the employee's name and ID number. I'm supposed to pass those values to the constructor... but i'm at a loss as to how to do that. First …

Member Avatar for ~s.o.s~
0
75
Member Avatar for xyster

Hello, I have what is probably an obvious question. I have a basic GUI, one is bsaically no more than a menu in its own class along with a bunch of support classes to do what i want. Another GUI which is for editing the information whcih the main GUI …

Member Avatar for xyster
-1
86
Member Avatar for blazingwolf7

Hi, I am currently working on building web pages that is suitable to be view and used on the mobile. I had asked around for suggestion on what should I used to build this web pages, and some suggested that I should used JSP. I thought that JSP is not …

Member Avatar for peter_budo
0
87
Member Avatar for program_writer

can anyone help me with my problem? this is the case, i have two text file from notepad the first one saved as text1.txt and the other one is text2.txt... the problem is i want to transfer the content of my first file which text1.txt to text2.txt but if i …

Member Avatar for darkagn
0
83
Member Avatar for W@n

Hi, recently i am doing an assignment that require me to do a depth first search on a given graph. However, i cannot get the result i needed. Is there any wrong with my code? Can anyone help? thank in advance=D My graph [code] 0 4 / \ / 1 …

-1
67

The End.