35,620 Topics

Member Avatar for
Member Avatar for Justinedeleon

Oh. btw admin! sorry about my earlier thread. i promise not to do something like that ever again :) anyway. i was having trouble with my project and its about Multiplication with loops. i started with a few codes and im really frustrated with what im doing now. please let …

Member Avatar for Justinedeleon
0
342
Member Avatar for sc0field1

I need to generate 500 random numbers from 200 to 1200 and use insertion to sort them. This is probaly simple for you guys but im confused. My problem is when i run the program all I get is 500 0's. Anyone help me out? [CODE]public class insertion{ public static …

Member Avatar for JamesCherrill
0
123
Member Avatar for vishalonne

Hi Every Body Does any one help me in deploying and running Servlet and JSP in Tomcat 5.5 I tried all the ways I found on net. I downloaded lots of tutorials and tried them also. But always getting same ugly error CONTEXT Path not found \TestInput I am just …

Member Avatar for peter_budo
0
200
Member Avatar for angelineygrubay

need help ... i need to have a java code for the feistel block cipher .. i know you can help me ... ' please .. :p -- thank you in advance /..

Member Avatar for peter_budo
0
166
Member Avatar for xtinawp

Hello, I have just started in a java class and having trouble with first assignment. Our first assignment was to enter into Notepad++ and enter a java program provided to us. I did this and saved the program as Quiz1.java. The next step was to compile the file using the …

Member Avatar for peter_budo
0
1K
Member Avatar for Ruchit bajwa

hello,i am using MS-access db and java code.i want to insert values in a particular row based on selected serial no. and i use statement [code] try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con2=DriverManager.getConnection("jdbc:odbc:ResumeDSN"); Statement stat1=con2.createStatement(); Statement stat2=con2.createStatement(); stu = new Student(); String Fir6=pers.tname.getText(); if(Fir6.equals("")==true){Fir6=" ";} String Sec6=pers.tdob.getText(); if(Sec6.equals("")==true){Sec6=" ";} String Thir6=pers.tfather.getText(); if(Thir6.equals("")==true){Thir6=" …

0
59
Member Avatar for atramposch

Ive written these two methods but they are giving me lots of problems. [CODE]public int indexOf(Object element) 128 { 129 for(int i = 0; i < list.length; i++) 130 { 131 if(list[i] != null && list[i].equals(element)) 132 { 133 return i; 134 } 135 } 136 137 throw new IndexOutOfBoundsException(); …

Member Avatar for Taywin
0
88
Member Avatar for tootiemae

How can i write a java program that will read the radius and height of a cylinder and compute the volume using the formulas Area= raduis*raduis*3.14159 and Volume= area*height, and have the program report the area of the bottom of the cylinder and the voulme of the cylinder.

Member Avatar for k-broxe
0
246
Member Avatar for Sai Sotes
Member Avatar for mhamy

Can you explain to me what's the meaning of the algorithm of SHA-1? ========================================================================== [CODE]package Finals; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class SHA { private static String convertToHex(byte[] data) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { int halfbyte = …

Member Avatar for JeffGrigg
0
176
Member Avatar for Ryden

Hello, I was asked to write a program that starts with a JFileChooser, the user is asked to choose a file. If at anytime during any part of this program, the user hits "cancel" or "yes" when the dialog shows "do you want to continue?" the program will return back …

Member Avatar for Taywin
0
342
Member Avatar for Laxman2809

Ok thank you for that explanations, but now I have an issue with my code. My remove function doesn't see to be working. Now I think it has to do with the fact it is not setting that CDs information back to empty or 0. Also it only stores 1 …

Member Avatar for Laxman2809
0
148
Member Avatar for danthevan

I am a student and we are working on a project in Access database but in windows. When I go back home I tried to run and edit the project but it didn't work. Notice that I don't have Access installed on my mac. My questions: 1- do I have …

Member Avatar for Ezzaral
0
145
Member Avatar for liphoso

i have the code below, i want to use a switch-case to check the grade of the student, my problem is that the compiler tells me that swithc only takes intergers as arguments. i had thought i cud have a statement like case a > b where a and b …

Member Avatar for JamesCherrill
0
167
Member Avatar for atramposch

I'm writing an indexOf method for a class called BasicArrayList. i have two private instance variables an Object[] called list, and an int called size. [CODE]public int indexOf(Object element) 67 { 68 for(int i = 0; i < size; i++) 69 { 70 if(list[i].equals(element)) 71 { 72 return i; 73 …

Member Avatar for atramposch
0
138
Member Avatar for Ryden

I have to deal with a program on arrays doing different things with such as finding out if the row contains a number in the first n rows, put all the numbers listed in the arrays without repeating numbers that are listed twice, finding numbers that are in common and …

Member Avatar for JamesCherrill
1
120
Member Avatar for niamul

I am a new programmer in Java and while programming I faced the following problem. I am trying to use switch statement on String but it gives compilation error. If any one suggest me how to use String in switch-case statement , it will be helpful to me.

Member Avatar for jon.kiparsky
0
2K
Member Avatar for Dersev

Hello I have a small problem with JList in external class file_tree. What should I add, write to show this JList in panel controlArea ? My application have a few files Core and two external classes. Code below This is Core File [CODE] import javax.swing.*; import javax.swing.JFrame.*; import java.awt.event.*; import …

0
74
Member Avatar for MrHG24

Hey everyone, I am having difficulty parsing digits in java. By that I mean that I am trying to make a program print out the number of bills the user recieves when he/she recieves change after there payment, (Cash register). Here is the code i've created to do this for …

Member Avatar for Taywin
0
210
Member Avatar for lbgladson

I have an assignment for school...Write a program CurrencyCOnverter that asks the user to enter today's price of one dollar in euro. THen the program reads U.S. dollar values and converts each to euro values. I have the following code. It works great until I start putting the loops and …

Member Avatar for lbgladson
0
727
Member Avatar for TheComputerGuy

I'm having issues with the abstract class idea...I've attempted to use Eclipse, but this time the IDE is just messing it up. I've got the files uploaded. They should be attempted to be compiled as this 1. Container 2. Base Container 3. Height, and color exception 4. Round and square …

Member Avatar for TheComputerGuy
0
136
Member Avatar for irock_4you

...Hello! Can Some One Please Help Me... I need help for my programming project...really need ASAP.,.tnx.,. [B]A. Control Structures (15 pts each) 2. Create a program that accepts a whole number which will dictate the layers of your Pascal’s triangle and displays the corresponding Pascal’s triangle. For example the user …

Member Avatar for IceFox16
0
296
Member Avatar for sathya88

how to free memory of byte array... code[CODE]for(int j=0;j<count;j++){ buffer=null; //[COLOR="Red"]free the memory by set as a null but not working????? shows array index out of bound exception for the second time[/COLOR] buffer= new byte[size]; //byte mem alloc temp2=di.read(buffer,total,size);// read buffer total=total+temp2; fo=null; ds=null; fo= new FileOutputStream(flist[j]); ds= new DataOutputStream(fo); …

Member Avatar for masijade
0
8K
Member Avatar for gahhon

i just met up a problem with array. [CODE] int[] num = new int[10]; [/CODE] this is everytime we declare and intialization one, how about to declare and intializate with unkown size?

Member Avatar for cwarn23
0
122
Member Avatar for aravind326

Hi, We are using AD 2003 server x64. Created new certificate, exported it into a file and using a simple LDAP Browser or a java code when we try to bind through SSL it fails and we are getting an error called SSL handshake failed: Simple bind failed. Please help …

0
154
Member Avatar for sengathir

I am not sure whether I am placing a Q in the correct section or not. let me give the scenaria I have the xml tag infos [CODE]<credentials> <userId>raj</userid> <password>raj</password> </credentials>[/CODE] i wanted to give this info to logger,(ie) [CODE]log.append(taginfo);//taginfo will be having this credentials[/CODE] Now i want to remove …

0
50
Member Avatar for danielagaba

Hi, i have eclipse indigo 3.7.1 and running xampp 1.7.4 with the tomcat plugin. I followed the tutorial at [URL="http://www.vogella.de/articles/EclipseWTP/article.html"]http://www.vogella.de/articles/EclipseWTP/article.html[/URL] and all went well till i reached the jsp/servlet tutorial where i keep getting a HTTP 404 error saying "[B]de.vogella.wtp.jsp.controller[/B]" is unavailable, preventing me from navigating amongst the pages. Thanks.

0
47
Member Avatar for plasticfood

i'm trying to write a game that show a background and a player on screen simultaneously using 2 different classes. here are the relevant parts of the program, or at least i think [code]public WorkingTitle2(){ super("Working Title"); setSize(550,429); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); loadPictures(); loadSounds(); pp = new PaintP(); pb = new PaintB(); add(pb); …

Member Avatar for plasticfood
0
144
Member Avatar for NICEGUY123

Okay here is my question, I have an text file file which looks like this BASKETBALL John Jacob 58% 15points FOOTBALL Jason Smith 24% 1touchdown BASKETBALL Mark Ramos 23% 25points BASEBALL Isaac David 10% 2 homeruns FOOTBALL David Sarlo 10% 0 touchdowns I am attempting to take a list like …

Member Avatar for Taywin
0
193
Member Avatar for Ryden
Member Avatar for sirlink99

I have an array of cards. It looks like this [CODE] String cards[][] = {{"Spade", "Heart", "Club", "Diamond"}, {"1","2","3","4","5","6","7","8","9","10","J","Q","K"}}; [/CODE] how would I get the suit and the "rank" of the card. I have tried [CODE] System.out.println (cards[1][5] + " of " + cards [1]); [/CODE] but that gave me …

Member Avatar for Taywin
0
224
Member Avatar for askylitcity

[CODE]import java.io.*; import java.net.MalformedURLException; import java.net.URL; import java.util.logging.Level; import java.util.logging.Logger; public class WebHelper { public static String getWebContents(String url) { BufferedReader br = null; String result = null; try { URL toFetch = new URL(url); br = new BufferedReader(new InputStreamReader(toFetch.openStream())); StringBuilder ret = new StringBuilder(); String line = br.readLine(); while …

Member Avatar for Taywin
0
146
Member Avatar for getmet

I cant see to figure out what im diong wrong here... many errors [CODE]public class Card { private String suit; private int face; public static void main(String[] args) { Card allSuit[] = new Card[4]; for (int i = 0; i<allSuit.length; i++) { allSuit[i] = new Card(); } allSuit[0] = new …

Member Avatar for Ezzaral
0
203
Member Avatar for thebiff

I am trying to create waypoints from a given file waypoints.txt I first created the waypoint class [CODE] import java.io.*; import java.util.*; import java.util.HashMap; import java.util.Iterator; public class waypoint { int x; int y; int height; int cost; int gold; int mapX; int mapY; public waypoint(int myX,int myY,int myHeight,int myCost,int …

Member Avatar for thebiff
0
268
Member Avatar for bibiki

Hey there, I built the following app; A frame that with three sections inside it. Each section is actually a panel. The first panel is a form I use for saving soccer matches on my database; The second holds only one button that reads textfields from the form above and …

Member Avatar for bibiki
0
556
Member Avatar for getmet

i get no GUI when i run! import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Calculator { private JTextField resultTF; private JButton calculateB, numbersB[] = new JButton[11]; public void driver() { //Create Window JFrame calc = new JFrame("Calculator version 1.0"); calc.setSize(500, 500); calc.setDefaultCloseOperation(calc.EXIT_ON_CLOSE); //Get the content pane (object of type …

Member Avatar for JamesCherrill
0
208
Member Avatar for lse123

To play audio clips in an Applet either in browser or viewer, needed set any env var, or plugin to install?

0
63
Member Avatar for Raj619
Member Avatar for anand01
0
99
Member Avatar for Ravi tiwari

I want to know that wheather php is good or java for web apllication development?

Member Avatar for Tofayel
0
182
Member Avatar for mattnguyen45

The Class has no error, but the test program has a constructor error on line 21. [CODE] /** * DataSet Class * * @version 10/3/11 */ public class DataSet { private int Sum; private double Average; private int Largest; private int Smallest; public DataSet(int Sum,int Largest,int Smallest, double Average) { …

Member Avatar for JamesCherrill
0
214
Member Avatar for spencer.kindt

I have to make a bank GUI and I have a Jlist that populates with the customer objects (viewable by name) and I can view their individual info... but when I select the customer, I also want to be able to pull their account info and put it in a …

0
124
Member Avatar for new_2_java

Hi all, I am trying to compile a servlet, and am getting the following error. [code] C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\flatironswp1\WEB-INF\classes>javac export\ExportUtil.java export\ExportUtil.java:5: package javax.servlet.http does not exist import javax.servlet.http.*; ^ [/code] and here's my code: [code] package export; import java.io.*; import javax.servlet.http.*; import javax.servlet.*; public class ExportUtil extends HttpServlet …

Member Avatar for Taywin
0
4K
Member Avatar for geeerald1131

I am going to make a project. My professor told us to make any java program. I am planning to create a grading system. That outputs: Name: Student Number: Course: Class Standing: Seatworks Grade: 5% Homeworks Grade: 5% Quizes Grade: 15% Preliminary Exam: 35% Final Exam: 40% Total: 100% and …

Member Avatar for Ezzaral
0
100
Member Avatar for Santosh gupta

Hello everybody. I am new to java and to this forum so please excuse my mistakes. i wanted to knew what happens internally when we do typecasting of any reference variable to its super type/sub type.Does there is any change in its reference?

Member Avatar for tkud
0
72
Member Avatar for shootingrubber

Hello, I recently started learning java, and I am trying to make a program and I am running into some trouble. Basically what I want is for the user to input the number of people attending a movie, and then the user could input all of the ages of the …

Member Avatar for shootingrubber
0
188
Member Avatar for mastdesi

I really need help with my assignment for java. Please give me a little push start with this assignment. I am really bad with getting the concept of the arrays. Please give me the starting part for a couple of classes and the driver class. Once i get started i …

Member Avatar for mastdesi
0
150
Member Avatar for kweigand

I am creating methods that will extract info out of a text file. The program is for a real estate office manager who needs to run reports on property listings. The text file will contain property number, property type, price, and agent id as follows. [CODE]110001 commercial 500000.00 101 110223 …

Member Avatar for ~s.o.s~
0
677
Member Avatar for softswing

Hai Fiends, I need to add \r\n(if \n is present or not) at end of every line of a huge file. how can i do this in java, with high performance. please help me in this problem.

Member Avatar for softswing
0
124
Member Avatar for Ranek

Hey there everyone. I wondered if anyone could help me out with writing a simple program that checks through blocks of HTML code replacing specific sections of code within each block of 3 <div>'s. It is basically to make my life easier when I have to edit a website, otherwise …

Member Avatar for Ranek
0
180
Member Avatar for rotten69

Hi everyone, I am doing a Java course at uni at the moment and it kinda doesn't make you become a real programmer with the confidence that a programmer should have. I really want to program in Java and any language(not python though because it is not a user-friendly programming …

Member Avatar for rotten69
0
190

The End.