35,618 Topics

Member Avatar for
Member Avatar for bubba-bo

Hi, I am trying to do an assignment about buying zoo tickets but I am becoming stuck on the last hurdle when trying to get the accumulate number. [CODE]import java.util.Scanner; public class ZooTaking { public static void main(String[] args) { // Create a Scanner Scanner input = new Scanner(System.in); // …

Member Avatar for bubba-bo
0
123
Member Avatar for Sharon5

I have a difficult time with getting the programs started. I read the book but I am not getting anywhere. There just is not enough examples to help me. The book we are using for CSC 135 is called Java Software Solutions by Lewis & Loftus. We are starting on …

Member Avatar for BestJewSinceJC
0
489
Member Avatar for zyaday

Is it a good programming practice to pass List as a parameter in a Constructor? Just learning.... Thank you ..

Member Avatar for BestJewSinceJC
0
47
Member Avatar for jiraiya

Hi everyone, I've written a small program to convert combinations of English characters into their corresponding Chinese and Japanese equivalents, and it's working on my computer at home, so so far so good. However, I'd also like it to work on computers which don't have Chinese or Japanese fonts installed, …

Member Avatar for jiraiya
0
171
Member Avatar for theausum

Code to Execute an SQL Script in JDBC. The SQL Script should have comments starting with - or -- only on new lines and each command should end with a ; . Reading a sql file and putting all of it in a string variable and feeding to the execute …

Member Avatar for fatso83
2
3K
Member Avatar for letigre

I've not programmed extensively, and I've got to create a program that's beyond my knowledge. I'm trying to create a program that will help me measure the amount of memory a certain IP routing algorithm will use to store address prefixes. The program must convert each dotted decimal address to …

Member Avatar for masijade
0
131
Member Avatar for indu_ss4

Hi! i'm a new user of jsf. I'm developing a web application in jsf 2.0 . There is a page in my application for which i have given session scope. In this page i retrieve values in a datatable from mysql database according to the chosen combo box values. I …

Member Avatar for indu_ss4
0
1K
Member Avatar for k2k

just wondering if anyone could explain this... [code] if(loginF.equals("root") && passwordF.equals("root"))[COLOR="Red"]; [/COLOR] ---> if this semicolon is here, my program works.. but i can't have an else statement if i take out this semicolon, the code within the if statement don't execute.. but i can then have an else statement …

Member Avatar for JamesCherrill
0
106
Member Avatar for zainz

I am tring to draw a house & street & garden but i stop....? could plz someone help me and complete my job this is my code import java.awt.*; import javax.swing.*; public class Zzzzzzzzzzzzzz extends JApplet { public void paint(Graphics a) { house(a); door(a); roof(a); rode(a); } void house(Graphics b){ …

Member Avatar for jwenting
0
113
Member Avatar for nitang

Hi all, I am a beginner in java.I have written a code to design a layout of a traffic signal.The lights are working fine.The problem i am facing is to randomly generate cars from all directions and to stop them at the junction.I am not understanding how to use repaint.Here …

0
55
Member Avatar for jiraiya

Hi everyone, I have a single string - let's call it string A. I have an ArrayList of objects. Each object contains three strings. I want to iterate through the ArrayList of objects and check if any of the strings contained within the objects are the same as string A. …

Member Avatar for jiraiya
0
94
Member Avatar for magic88

Hey guys, In JSP I used to create my sessions in my servlet like this: [CODE]session.setAttribute("user", username);[/CODE] and then call it from a JSP page like this: [CODE]<%= session.getAttribute("user") %>[/CODE] However this does not work in JSPX pages and its driving me crazy. Can any one help me? Any help …

Member Avatar for peter_budo
0
95
Member Avatar for Mandana_bgh

hi i use log4j for logging i want the file that logs append to it , in every day be separated .for example my logs for today input in 2010-04-20.log and tomorrow in 2010-04-21.log file!! or any way that i can understand that this log file related today and that …

Member Avatar for Mandana_bgh
0
100
Member Avatar for pranay_agg

how can one determine whether a given string can be expressed as a concatenation of palindromes of even length.

Member Avatar for jwenting
0
106
Member Avatar for the_mia_team

I Have this problem and honestly have no idea where or how to start this, can anyone give me an idea or help? [QUOTE]Write a JavaScript program to calculate the statistics of words in a web page. When running the program in a web page, the script should output all …

Member Avatar for jwenting
0
113
Member Avatar for RichardCrickets

So I have my documentbuilder and I'm doing this the DOM way. I've managed to get to the point where I have saved the tag I want into a nodelist NodeList list = doc.getElementsByTagName("myTag"); the xml looks like this <myTag id="1"/> but now I want to grab the id number …

Member Avatar for moutanna
0
95
Member Avatar for helpmepassclass

i am writing a program for my java class and have to create a calculator, i got the calculator to work for two numbers but can't get it to do more than two numbers and it needs to. any help will be greatly appreciated. If you take out the tnum …

Member Avatar for BestJewSinceJC
0
98
Member Avatar for squigworm

Hello everyone, I am writing a program that will read data from a txt file and for the life of me I cannot get it to do so ... Seems like no matter what ! I do it keeps telling me it cannot find the file .. I have used …

Member Avatar for BestJewSinceJC
0
133
Member Avatar for nschessnerd

Hey ppl. I've been working on this forever and cant seem to get it. I am developing a site in jsp using netbeans and i have an applet i want to add to a page.I know i have to use <applet> tags but i dont know what to put to …

Member Avatar for peter_budo
0
126
Member Avatar for ku95

I'm currently doing a model, however its occurred that I'm getting 1 error that which is saying that the && operator. I don't fully understand why that is. If there is a solution to this that would be great, also with a good explanation why I have made this mistake …

Member Avatar for BestJewSinceJC
0
3K
Member Avatar for pringles08

[code]public String viewByItemCode(String icode) { String search = " "; for( ; x<recordNum ; x++) { if(itemRef[x].getItemCode() == icode) { search = ("\nItem Code: " +itemRef[x].getItemCode()+ "\nItem Description: " +itemRef[x].getItemDesc()+ "\nItem Unit Price: " +itemRef[x].getItemUnitPrice()+ "\nItem Quantity: " +itemRef[x].getItemQty()+ "\nItem Unit Measure: " +itemRef[x].getItemUnitMeasure()+"\n"); } } return search; }[/code] Supposed …

Member Avatar for pringles08
0
106
Member Avatar for Amresh.K

import java.awt.*; import java.awt.event.*; import javax.swing.JApplet; public class CarApplet { private Image carLeft = null; private Image carRight = null; private Image carUp = null; private Image carDown = null; private Image carImage = null; private int direction = -1; privte Point carLocation = new Point(25,25); ? /*Over here this …

Member Avatar for Katana24
0
111
Member Avatar for funnychild

hi, i just wanted to know why do we need drivers in java to connect to a database when we do not have any such driver for PHP? [CODE]String str = "com.mysql.jdbc.Driver"[/CODE] any help will be greatly appreciated

Member Avatar for jwenting
0
49
Member Avatar for asduae
Member Avatar for jwenting
0
87
Member Avatar for squigworm

Hello everyone, I am interested in creating a program that A).. displays a picture at random from a specific pool of images as a screensaver ,, and B) allows the user to set a time frame in which one of the pictures will randomly pop up on the screen.... Can …

Member Avatar for squigworm
0
73
Member Avatar for Sanita

Hellow. Am new with java programming. i have created GUI frame and the database but i dont know how to retrieve data from the database table and how to write data into the database table. Please can any one help me as soon as possible.

0
20
Member Avatar for hsncvs

hi guys i want to learn if there is an equivalent of " vblf " (from visual basic) or " \r " (from c#) in java ?

Member Avatar for darkagn
0
79
Member Avatar for blackx
Member Avatar for gnarly

I'm reading in a text file and want to parse based on labels within the text file. At first I was trying to do this with patterns, but after spending some time reading the API documents, I'm not sure what I need. I think I'm making this too complicated. Example …

Member Avatar for BestJewSinceJC
0
100
Member Avatar for ttboy04

I want to make an object move to a new height from the user request. My code below does not do that. Where am I going wrong. thanks in advance. /* instance variables */ private Aobject object; public void moveObject () { int number; { number = Integer.parseInt(Dialog.request("Enter new height?")); …

Member Avatar for ttboy04
1
95

The End.