35,618 Topics

Member Avatar for
Member Avatar for klackey19

Hello all, I am writing a program for a class that implements a parser for a given grammar. I have already successfully written it in c++ and now I have to also write it in java. The string to be parsed is a string array in my program and when …

Member Avatar for Mikeyp926
0
154
Member Avatar for shakunni

Hey, so I need to write an algorithm that will do the following and run in O(n): Search linearly through an array of size n and for each element check whether array[i]>array[i-k] for all k=1,2,...n/5. Its easy to do this with two loops but I cant figure out how to …

Member Avatar for eggmatters
0
106
Member Avatar for Fire00f1y

Unfortunately, I couldn't find a suitable thread already so please forgive me if there is one already... but! This was a project due today which I just bit the bullet and left out one part of. Here is my problem: I am building a circular doubly linked list with a …

Member Avatar for ~s.o.s~
0
172
Member Avatar for ahmedshayan

1. Create a class Account that has following instance variables: a. private account number (string) b. private account holder name (string) c. private balance (floating-point) d. private account opening date (string) e. profitRate (final, floating-point): 5% for all accounts Supply a default constructor, a parameterized constructor, and a clone constructor. …

Member Avatar for javaAddict
0
783
Member Avatar for popi
Member Avatar for musi80

hi all i need to make a upload option for user to upload .csv file using jsp then i have to read the .csv file and validate it. if i validation of row is correct then i have update in database else i have to show the error to the …

Member Avatar for patelakhil
0
738
Member Avatar for tipalm

Hello all I am trying to get a JButton to toggle the setVisible on a JPanel label with an image on it. Below is my code. Thx in advance! [CODE] import javax.swing.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class ButtonExample_Extended implements ActionListener { JPanel titlePanel, buttonPanel, dealerPanel, playerPanel; JLabel dealerLabel, playerLabel, …

Member Avatar for quuba
0
165
Member Avatar for Loved

Hi, I am fairly new to java and have been playing around with scanners and while trying to understand this problem I am running into an error "Non-static variable vacation cannot be referenced from a static context" Obviously this isn't quite a completed program, but I am not sure why …

Member Avatar for Loved
2
163
Member Avatar for udayangaS

hi, i,m newbe to hibernate. can any one explains how to do bi- directional associations in hibernate . cheers... udayanga

Member Avatar for udayangaS
0
57
Member Avatar for eggmatters

Hello all, I have used this code throughout this application with no troubles. I am creating a datatable, and the data is a result set returned from a sql query to an oracle 11g database. I'm creating a TableModel class that overrides the AbstractTableModel so I can add fetures to …

Member Avatar for ~s.o.s~
0
892
Member Avatar for anki.gulsvart

Hi. I really need help. I´ve written a program in java that connects to an ftp-server and changes files. as it is now i have a JPanel and i have to press a button and write the name of the file but i want the program to do this automatically …

Member Avatar for eggmatters
0
83
Member Avatar for dhanh90

I'm new to java.I write the code and dont know why its wrong.Someone can point out and modify it for me.thanks alot. Here the code[CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package OOP; import java.util.Arrays; import java.util.Scanner; /** …

Member Avatar for sneaker
0
319
Member Avatar for estefania
Member Avatar for Krishna_vs

Hi, Is it possible that, the Iteration of normal bean (not a Form bean) values contained in a vector into a jsp page.? please help me

0
41
Member Avatar for nateuni

Guys.. I am trying to figure out Comparator so I can compare Strings in an object array (the object has other data types as well). I have been hunting around and have come up with this.. but I cant get it to work --> Can anyone point me in the …

Member Avatar for nateuni
0
95
Member Avatar for lithuanian

Hello. I'm currently have a task to make but i can't complete it because of my weak knowledge. I need to draw half of sin parabola with straight lines . Like this [url]http://www.mif.vu.lt/matinf/asm/vs/pask/java_pr/uzd/7.jpg[/url] It gives me a headache because i really don't like JAVA (I think it's not for me) …

Member Avatar for lithuanian
0
144
Member Avatar for Samyx

I want to create a method equals(Object obj) to test if two objects are equal. But I don't even know how to start. Here is my program [code] class LinkedList { ListItem front = null; ListItem rear = null; int numItems = 0; // Current number of items. // Could …

Member Avatar for Jocamps
0
146
Member Avatar for Derice

i am using scanner class, i faced problem when i tried to get a string with space. How can i modify my code to solve the problem. Here is my code: [CODE] import java.util.Scanner; class abc { public void main(String[] args) { Scanner abc = new Scanner(System.in); System.out.print("Name: "); String …

Member Avatar for javaAddict
0
122
Member Avatar for syum

Hi all, I'm having tough time on how to use linux commands from the servlets. I am able to run the commands from java program but I can't run the same program from servlets? Is there a way to do this? Here is a sample of my code that runs …

Member Avatar for ~s.o.s~
0
84
Member Avatar for kilermage

I wrote up a CombatHandler class. Here is what the begining: [CODE]public class CombatHandler extends client {[/CODE] But when I compile I get this error: [CODE]Running Compiler -------------------------------------- CombatHandler.java:3: cannot find symbol symbol : constructor client() location: class client public class CombatHandler extends client { ^ Note: stream.java uses or …

Member Avatar for ~s.o.s~
0
117
Member Avatar for chengeto

I am trying to get this program to count the number of characters in a string. By number of characters l mean not punctuation or a space.What is wrong with my code because l don't understand why the program won't work? [CODE]import javax.swing.*; publiemc class ExamPractise { public static void …

Member Avatar for ~s.o.s~
0
166
Member Avatar for ZER09

I need to create a scientific calculator using applet in neat beans 6.1 but i cant do it. if there someone who did it before, can you help me about my problem.its for our project in our school. asking a help.Thanks a lot.

Member Avatar for .11
0
77
Member Avatar for nola_Coder

Hello... This is my last assignment from my Data Structures class. I turned it in and got a good grade, but it still has one problem that I am unable to pinpoint. The assignment is as follows: Create an alphabetical linked list from a .txt file containing various names. (1 …

Member Avatar for nola_Coder
1
166
Member Avatar for bruceaj

I have several classes that I use in almost every one of my projects. [B]What[/B], and [B]How[/B], do I create something so the I can easily access them? I'm use NetBeans for my IDE. Thanks..

Member Avatar for quuba
0
315
Member Avatar for Chad W

This is my now finished code: [CODE]// ********************************************************** // Count.java // // This program reads in strings (phrases) and counts the // number of blank characters and certain other letters // in the phrase and quits upon the user entering the phrase "quit". // Modified by: Chad Watkins // ********************************************************** …

Member Avatar for Grn Xtrm
0
152
Member Avatar for lilspeed500

only scanners, strings, for loops, while loops, and if/else statements are allowed. 1. main method. In the main program declare a Scanner variable that is hooked up to System.in. You need to include the line of code import java.util.*; at the top of your program. Pass the Scanner object you …

Member Avatar for Grn Xtrm
0
148
Member Avatar for timon_zed

Am trying to read a date that i have stored in a database table and then parse it to a date object of the Date class using a servlet, but it returns null for the converted date.Where am i going wrong?Some advice on how to sort that out would be …

Member Avatar for peter_budo
0
100
Member Avatar for mayurjadhav

How can i develop my logic to develop any software? i am study well but then also can not did it properly. You have any solution about that. how can develop software using C#,java ,etc other.

Member Avatar for quuba
0
97
Member Avatar for shakunni
Member Avatar for BestJewSinceJC
0
88
Member Avatar for geek_till_itMHZ

I am trying to make a very simple program for a school assignment. I simply need to display 3 random icons of playing cards. All the icons are stored in an image file as 1.png-52.png Is there anyway to do this with out identifying each individual image, adding it to …

Member Avatar for truebot
0
84

The End.