35,619 Topics

Member Avatar for
Member Avatar for adil_bashir

please give some piece of code that will make me understand that how to pass an array to a method/function?

Member Avatar for adil_bashir
0
183
Member Avatar for adil_bashir

Since i am new to java, so please tell me that is there any way by which i can convert integer array to primitive int?? if yes, give some code.

Member Avatar for adil_bashir
0
254
Member Avatar for adil_bashir

i need to return the ASCII value of the argument passed in the StringtoIntfunc(). But i am not getting the real ASCII values and i think the problem is with the return statements? please help. public class StringIntfc { public int[] StringtoIntfunc(String s) { int j =0; int k[] = …

Member Avatar for DavidKroukamp
0
127
Member Avatar for lalaZai

If user enter all these then i need to use what to store it in a same group (many different group) [code]import java.util.Scanner; class addBook { public static void book() { int isbn; Scanner inputDevice = new Scanner (System.in); System.out.println("Enter ISBN ...\n"); isbn = inputDevice.nextInt(); int title; System.out.println("Enter TITLE ...\n"); …

Member Avatar for stultuske
0
115
Member Avatar for sagar2dumbre

i am developing a web app using .jsp , servlets and access as a database..i want to do it using struts framework..so can anyone tell me best book available for struts beginners ? i will prefer "struts 1"..as many books are available for this version.

Member Avatar for stultuske
0
113
Member Avatar for techyworld

hi can you help me to modify this program to make it an isoceles or equilateral triangle? right now am having a right angle triangle! [CODE]import java.awt.*; import java.awt.event.*; import java.awt.geom.*; public class Triangle extends Frame { Line2D line1 = new Line2D.Double(50,150,150,150); Line2D line2 = new Line2D.Double(50,50,150,150); Line2D line3 = …

Member Avatar for zeroliken
0
1K
Member Avatar for TIM_M_91

Hi guys I am able to drop my tables that I want but however when I come to trying to drop rows the rows do not delete. I have tried the following which have all produced the same error duplicate key TABLENAME : Any help you can give for a …

Member Avatar for TIM_M_91
0
140
Member Avatar for phy2sma

I'm having problems adding a JPanel, which has a paintComponent in it, to a JFrame. If this is the only thing I add to the frame, it works. But as soon as I add a layout manager and add other components to the JFrame, it no longer shows the panel …

Member Avatar for JamesCherrill
0
232
Member Avatar for ringo_tech

hi everybody, i needed to play mp3 audio in my AudioPlayer project i found jlayer is the easiest way to play mp3 audio,it plays well but can't stop playing my GUI stops responding until the audio is finished! any help please this is the code of the playing button -chooser …

Member Avatar for ringo_tech
0
1K
Member Avatar for konman795

I need to write a program to find the first 10 prime numbers, i.e. integers that are only evenly divisible by themselves and 1. The hint I got was to make a big array of booleans named "isprime" and mark off all the non-prime numbers as false, i.e. isprime[4] = …

Member Avatar for JamesCherrill
0
775
Member Avatar for Erdem.

i use eclipse with tomcat 7 and compile servlet without problem... but i try to blank jsp file its error what is the problem? [CODE]<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> <h3>Test …

Member Avatar for Erdem.
0
157
Member Avatar for ubi_ct83

Hi all, i have a task which is create an algorithm from a java code.and i need help from u guys to check on my algo put a comment on what should i change or why it is wrong. I really appreciate if u could help me on this matter... …

Member Avatar for ubi_ct83
0
156
Member Avatar for ilovejava

[URL="http://i.imgur.com/iwNHY.jpg"]http://i.imgur.com/iwNHY.jpg[/URL] i already set a path for jdk and etc, it worked before but now it doesnt work the code works on ecclipse so the code is correct but i have to learn how to compile using command prompt check out this image i get this same error i do …

Member Avatar for NormR1
0
304
Member Avatar for konman795

Hi all, this is a homework assignment that I'm not sure how to begin with. We are given all the code and I just need to finish a function to convert digits to words. For example, the string "1, 2, and 3." becomes "One, Two, and Three." The String "10" …

Member Avatar for konman795
0
356
Member Avatar for jakubee

Hello everyone, This is my first post in here :) Need a help with v. simple exercise. I need to ask user to input 10 objects of type Product (String name, Double price). I manage to done this. What i need to do now is to validate this inputs! I …

Member Avatar for DavidKroukamp
0
5K
Member Avatar for TIM_M_91

Hi guys I have successfully set up my database which through my GUI I am able to create my tables that i wish and insert data into the table. My problem is through that I can only insert one row of data into a table so what would I need …

Member Avatar for richieking
0
104
Member Avatar for gowans07

Hey, totally new to Java. How would i go about compiling .class or .jad files into .jar? What software do i require too? Thanks in advance

Member Avatar for DavidKroukamp
0
99
Member Avatar for Sanna.1

hello how do you get three strings in to a boolean. Number 1 is greater than the number 2, which in turn is greater than third Number 1 is greater than one of the numbers 2 and 3, but not greater than both Number 1 is greater than at least …

Member Avatar for Ezzaral
0
125
Member Avatar for KazenoZ

Hello guys, Well, here's a simple one for you, which I just could not find the answer to due to lack of finding a good way to put it in words for Google. I'm pretty much a newcomer to Java, first project I used Java for, actually, and it was …

Member Avatar for Zhoot
0
247
Member Avatar for mbrand

Just wanted to introduce myself. I worked at Microsoft and Amazon.com, amongst other companies in various capacities. I now recruit for a really, really cool company. • 22 developers • 80 gigabits/sec video streaming • 600 million PHP requests/day • 35 million uniques...day! • 10 million registered users We are …

0
160
Member Avatar for Syrne

Hello all, I've been fooling around with some code trying to teach myself somewhat about Linked Lists. I wrote this quick program that creates a random number in each node of a list and asks the user to guess the number. I have a quit choice that, when executed alone …

Member Avatar for DavidKroukamp
0
219
Member Avatar for TIM_M_91

Hi there well title says it all really. Is it possible instead of creating tables within my database to create the tables within a form in java? . If it is possible how would I go about doing this?. Before you ask yes my database is fully connected to my …

Member Avatar for TIM_M_91
0
165
Member Avatar for harishpenumudi

[CODE]import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Font; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.PrintStream; import java.net.Socket; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.UIManager; public class PeerLogin extends JFrame { private JLabel …

Member Avatar for Ezzaral
0
177
Member Avatar for LdaXy

i'm extremely new to java, so i'm probably making a mistake somewhere. anywyas, my program works, however whn the user repeats the data entry, it does not get replaced with new data. [CODE]package convhms; /*HOW THIS WORKS: * * the main function captures the user input as a float * …

Member Avatar for JamesCherrill
0
138
Member Avatar for mhd_arif123

I dont have any code to show you here . i would like to know that how a java application enabled to read information from an electronic id card (via a device which reads it)or to read information from a barcoded id card. Please show me a way to do …

Member Avatar for mhd_arif123
0
148
Member Avatar for javaprog200

Hello, The following program has three JPanels - one to hold the image, one for the JComboBox and the last one for holding the JLabel, JTextArea and JButton. Once a selection is made in the JComboBox, the user will enter text in the textarea and press the button. The button …

Member Avatar for javaprog200
0
248
Member Avatar for kalcio

hello, I need help for my code, I created an interface that contains a button and a JProgressBar with the netbeans interface, but I do not know how to change the color of the JProgressBar, I tried the method setBackground (Color.color), click right on the JProgressBar proprties Does not change …

Member Avatar for kalcio
0
2K
Member Avatar for connoisseur2010

Hey guys, I wish to do a project in Java Language but dont know what to do. I need ideas. Help!

Member Avatar for stultuske
0
93
Member Avatar for mohamed moamen

I'm study Compressing and Decompressing Data Using Java APIs from [url]http://java.sun.com/developer/technicalArticles/Programming/compression/[/url] but when i compile this example: [CODE] import java.io.*; import java.util.zip.*; public class UnZip { final int BUFFER = 2048; public static void main (String[] args) { try { String fileName = "your zip file" //but your zip file …

Member Avatar for mohamed moamen
0
336
Member Avatar for dave_t

Hi! How can i remove from a file a spesific line which includes "abc" string by using RandomAccessFile libary? Thanks

Member Avatar for DavidKroukamp
0
1K
Member Avatar for nore

Hello all! I want to ask you , how to pass variable, there's the example: I have variable String X in pageone.jsp then i open a new tab page to pagetwo.jsp (using JavaScript window.open) , Is it possible to use the variable X (from pageone.jsp) in pagetwo.jsp ? Please Explain, …

Member Avatar for javaAddict
0
244
Member Avatar for Zaad

Hi All; Im just making a simple Desktop app. Ive got a need so that the user could be able to add data to the table dynamically. Ive done implementing the table and also code for adding rows. Issue is after i add the row it is not displayng in …

Member Avatar for Zaad
0
1K
Member Avatar for dennysimon

hello all I use notepad++ to create my code I use dos command to javac the code some times when there is error in my code the the dos console shows many lines of error message my question is : if the error lines's message is 100 lines or more …

Member Avatar for dennysimon
0
168
Member Avatar for Sanna.1

hi every one I have a exercise when i going to use boolean. Im need to do 3 intergervaribals var1 var2 var3 and then i get same claim im going to get in to it like one of it is: The number var1 is evenly divisible by 7. i figuer …

Member Avatar for JamesCherrill
0
294
Member Avatar for autorunman22

I was using Struts 2 as web framework and eclipse EE as my IDE. I can run my jsp/servlet application just like the way i wanted it to be but everytime i start the tomcat ver 6 server, an INFO log always appear except that its asking for log4j. here …

0
79
Member Avatar for rupes0610

I have a Sudoku puzzle and I need to make sure that each row and column have each number 1 through 9. What is the easiest way of doing this? The code snippet that I have so far is below. public static boolean rowsAreValid(int[][] array){ for(int i = 0; i …

Member Avatar for hfx642
0
312
Member Avatar for thepanther

hi i am trying to make a hangman game and what ineed to do is when there is wrong answer to put pic of part of the hangman but dont no how to do it, here is my code thanks [CODE]int charPos = +1; String letter = ALetter.getText(); charPos = …

Member Avatar for Ezzaral
0
458
Member Avatar for uurcnyldrm

Hi everyone, Is there a way to read the text in a pdf file like reading notepad? And after that, I should be able to use it, for example, in a text area or show it to my users without using another program such as adobe reader. That's really important …

Member Avatar for uurcnyldrm
0
249
Member Avatar for uurcnyldrm

Hi people, How can I put a JRadioButton wherever I want in a JPanel? I tried setLocation() but it did not change anything. It is still on the north-center part of the panel. I think I'm missing something, but I can't figure it out. Thank you in advance.

Member Avatar for NormR1
0
188
Member Avatar for nishasthomas.pt

I am doing my project in datamining area.Please help me with the code for clustering a set of attributes in database.

Member Avatar for BitBlt
0
38
Member Avatar for macdunk11

So I'm trying to print the first six generations of the Game Of Life in a 7x7 array. I only have the code for one generation, but I can fix that later. I made the array types integers. What I need help with is getting the correct code for all …

Member Avatar for gusano79
0
176
Member Avatar for vaironl

Hello forum, Vaironl here. I already asked this question with no luck. So now I will to repost it without the code. I have a JPanel which contains labelsand JTextField + other components. When I minize the window and then restore it The components stay in place but the are …

Member Avatar for vaironl
0
110
Member Avatar for missc
Member Avatar for stultuske
0
201
Member Avatar for Kalle21

[CODE]import java.util.Scanner; class wloop { public static void main(String[] args) { int counter=2; int sum=0; while( counter<=200 ) { sum = sum+counter ; counter = counter+2; } System.out.println("The sum of integers from 2 to 200 is: " +sum); } }[/CODE] [CODE]import java.util.Scanner; class wloop { public static void main(String[] args) …

Member Avatar for stultuske
0
116
Member Avatar for iamcreasy

How to start a servlet automatically when index.jsp starts. To put it simple, here is the index.jsp file. [CODE]<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>JSP Test</title> </head> <body> I want to put something here, so a servlet automatically starts without doing anything. </body> </html> [/CODE]

Member Avatar for nore
0
206
Member Avatar for Pankti Desai

I am making a program in jsp servlet. There are three tables in database: category , subcategory and items. Their structure is like this :: category 'A' --> subcategory '1' ===> item 'i' ===> item 'ii' ===> item 'iii' --> subcategory '2' ===> item 'iv' category 'B' --> subcategory '3' …

0
65
Member Avatar for Ashenvale

Can anyone tell me y is it that taxDeduc won't return the value? [CODE] import java.util.Scanner; public class PayollComputation { public static void main(String[] args) throws Exception{ Scanner get = new Scanner(System.in); //variable declaration int ctr, loc = -1, payrollPeriod, daysAbsent, minsLate, oTHours; int tempENo = 0; char ans, ans2; …

Member Avatar for Ashenvale
0
159
Member Avatar for justin08

Hello everyone or anyone! Could some please assist me on how to read a text file like this: ProgrammingAssignment1Data.txt 123 South Market Street Downtown 101 Package 0 1599 Burbank Road Cinema 10 Movie posters in tubes 1 1 order slip format is: Pick up address Drop off address item description …

Member Avatar for stultuske
0
194
Member Avatar for Gsterminator

Hey I need help making a isEqual method in my singly linked class. The goal is to prove that both list have the same elements without necessarily having the same order. Now my method does call a different method in the node class, and it's job is to to search …

Member Avatar for Zhoot
0
191
Member Avatar for ThaiAmL

Hello! I'm writing a very simple program to get used to using GUIs, and I'm having a bit of trouble. We're supposed to be writing a program that just creates a window and after the user puts in a number, it calculates the square root and the square of the …

Member Avatar for ThaiAmL
0
218

The End.