35,618 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … ![]() | |
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, … | |
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 … | |
hi, i,m newbe to hibernate. can any one explains how to do bi- directional associations in hibernate . cheers... udayanga | |
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 … | |
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 … | |
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; /** … | |
Hi, how do u calculate the sum of the numbers in the array? Thanks! | |
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 | |
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 … | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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.. | |
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 // ********************************************************** … | |
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 … | |
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 … | |
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. | |
Hey, How do you go about proving that log(n!) is big Theta of n log n? | |
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 … |
The End.