32,199 Topics
| |
hi Q1 could anyone let me know what difference would it make to the program in terms of memory and program speed if i use arraylist or hastable or vectors Q2 which of this is better program practise declare separate vectors or arraylist for different data or use hashtable and … | |
I want to find the line number before inserting a text into text area......... | |
I've made java desktop application,swing gui in netbeans and it works in netbeans but I have 2 problems: 1. I cant export working jar or class files 2. I need to run and build it from cmd line in windows xp I guess that I need to include something in … | |
I am using [CODE] Runtime.getRuntime().exec("cmd /c REG ADD HKEY_CURRENT_USER\\SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\POLICIES\\SYSTEM /v DisableTaskMgr /t REG_DWORD /d 1 /f"); [/CODE] This is a slow process. though it added the registry key, but it went into long sleep, as if infinite loop. similarly for Deleting the registry key. Can anybody tell me the reason … | |
I need to write a program for someone to enter 5 numbers from 10 to 100 and eliminate duplicates. after entering 5 valid numbers, i get error, Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at DuplicateElimination.main(DuplicateElimination.java:23) | |
I usually program in java but I'm going to implement this in C but the general logic psuedo code should work I would think. these numbers represent these characters: 2-abc 3-def 4-ghi 5-jkl 6-mno 7pqrs 8-tuv 9-wxyz If I were to type in a 7 digit number say 233-7687 as … | |
Problem while running program: java.lang.NoSuchMethodError: main Exception in thread "main" My code is: [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Plane extends JApplet implements ActionListener { JTextField input; JLabel prompt; JButton yesButton,noButton; int section, firstClass,economyClass; boolean seats[]; boolean questionPosed= false; public void main( String args[] ) { prompt … | |
Can someone help me figure out what I am doing wrong here. I think I may be running my head into this way to many times to see what is wrong with it. The error code is posted below. [CODE] import java.util.Scanner; public class userName { /** * @param args … | |
my problem comes up with the code is creating an envelope it keeps saying that envelope can not be resolved to a variable any idea on how to fix this? [CODE]import java.io.*; import java.net.*; import java.awt.*; import java.awt.event.*; /* $Id: MailClient.java,v 1.7 1999/07/22 12:07:30 kangasha Exp $ */ * A … | |
I have this code, when run, it is terribly unorganized. It looks like this: [Label Here] [Button Here] [-----TextField Here ----] [invisible Label][Button] my program does this: when something is entered in the JTextField and then you click the [Button Here] then it prints what you printed in the [invisible … | |
[CODE]//Created by //Ticket Reservation System of 5 first class and 5 economy tickets import java.util.Scanner; public class Planeticket { public static void main(String args[]) { boolean EconArray[] = new boolean[5]; // boolean array with 5 elements boolean FirstArray[] = new boolean[5]; Scanner input = new Scanner(System.in); int value; for(int i … | |
Hai, I just want to ask, How to run java program without opening the code? I mean when we click on an icon, the program will automatically run... Thank you. | |
Hey all.I got a question about the use of action listeners.Actually its more about actionEvents.Anyway,my question is: Supposing i have a frame with four buttons,say "A","B","C","D". I want each time i press a different button something different to appear on TextField.I know i can make 4 different button subclasses,each with … | |
Hi, I'm new to Java and programming. I have an assignment I'm trying to do and I'm pretty stumped on this question. I have a TreeMap where the keys are Strings (of musical artists) and the values are Lists (of artist name, album title, album genre and album year). I … | |
I know this is a pretty newbie question but is it possible for me to start an external application then exit my java application ? But the application I hav started should remain running until it exits on its own. | |
i want to encrypt the password and store in the database. i extract character find ascii value of that and changed that value and stored in the database.but when i use this it wont have much security. can anyone help me for password encryption.i m using JSP+HTML | |
How i can call webservice(which is develop in eclips) on JSp page !! please give suggestion | |
I want to reverse and array of integer recursively, I think this is the way but I get this error when trying with a 5 integer array: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at name.of.package.ArrayAscDesc.CambioAscDesc(ArrayAscDesc.java:12) at name.of.package.ArrayAscDesc.main(ArrayAscDesc.java:34) Here's the code: [code]import java.util.Scanner; public class ArrayAscDesc { public static int[] CambioAscDesc … | |
Hi, I have to insert data into a database table using jsp and jdbc, query the table data and convert it into an xml file. I am using NetBeans IDE. I'm really stuck and i have a project due. Please do help:'(. Thanks in advance. | |
hey guys i came across a tutorial online that shows how to make a java media player using JMF..the problem is when i run the program and open the file i get the following error..i googled this and found no help can anyone please tell me whats wrong ? T_T … | |
Hello, I was wondering if there is some sort of Java code that can get information from a webite ONLY when it needs to. To better explain (by using an example) let's say I have a slow webpage (minimal traffic) where a user clicks a button and Java opens my … | |
Hey, I made this code with the bits and pieces of knowledge i have, but i don't know how to convert it into a while loop. it is currently in a for loop. the program counts how many certain letters there are in a sentence/ word. String word; String letter; … | |
How to create a property file in java | |
In the method below trying to calculate average age in each category('o','u','n'). Ages are stored in a separate class. Code: public double averageAge() // calculating average age in each BMI group { double numbers[]=new double[this.list.length]; double result=0; char[] cat={'O','U','N'}; for (int i=0;i<this.list.length;i++){ int b=this.list[i].age; for(int j=0;j<3;j++){//loop runs three times, as … | |
HI I have method object appointment ,and inside this object I have another object time and I want to get startHour method(inside the time object) (method startHour(inside TIME(object)inside Appointemt(object)) How can I do that :@ Thanks | |
Hey guys, Can anyone tell me what I missed in the following code? I've tried everything that came up to my mind, but I can't pass this error. Let me give you some context. My friend and I are making this program that is supposed to send message through command … | |
| |
Activity # 1. Create a program that inserts nodes using a binary search tree. Use an array structure to represent nodes of the trees. Activity # 2. Create a program that traverses a binary tree. Use the preorder, inorder, and postorder traversals. | |
Hi, I have to make a linked-node based priority queue for an assignment. For some reason, however, the enqueue and dequeue just won't work. I have honestly no idea why, because I think the algorithm should work. Can anyone point out the problem? It would be greatly appreciated. [CODE] public … |
The End.