32,199 Topics
| |
Hye everyone, I am trying to make a 2d-char array, fill it with random letters(chars) and print it. If I do it like this I get a ArrayIndexOutOfBoundsException: 0. I am a newbee. I import my prefs(width, height) from static getters in the class preferences. Can anyone help me please? … | |
Our teacher gave us an assignment.Can anyone help or give me some idea on how to solve this java problem? im still learning java. Here's the problem: "Write some code to demonstrate to yourself the chain of construction. Create an inheritance hierarchy of 4 classes. Give them any names you … | |
Design program Infix that will convert the expression from infix notation to post fix notation using Stack operation. Observe hierarchy of operators. Sample Input/output Enter infix : 4+6*7-8 Postfix equivalent is 467*+8- | |
I am using a Jtextpane in my application. I want to add line number in it. How can I do it. please help.... | |
Hello, I have a to make a class called fibonacci. This is what is given to us : fibonacci(0)=1 fibonacci(1)=1 fibonacci(n)= fibonacci(n-1)+fibonacci(n–2) Below is an example of running the fibonacci class as an input of 6. The output is: fibo(0)=1 fibo(1)=1 fibo(2)=2 fibo(3)=3 fibo(4)=5 fibo(5)=8 fibo(6)=13 [B]My code is:[/B] [CODE] … | |
Hi, I am trying to get a Javascript working in an XSL document and i can't seem to make it work for some reason. I have placed the following code within the head of my document. [CODE] <msxsl:script language="JScript" implements-prefix="user"> <![CDATA[ function popup(mylink, windowname) { if (! window.focus)return true; var … | |
define briefly about DTW algorithm for voice recongnition also how to implement java speech api in netbeans???????????????????????????????????? | |
Other than the usual [CODE]AudioInputStream stream = AudioSystem.getAudioInputStream(ClassLoader.getSystemClassLoader().getResource("____.wav")); DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat()); Clip clip = (Clip) AudioSystem.getLine(info); clip.open(stream); clip.start();[/CODE] Since the buffer limit is 2mb for an UNCOMPRESSED wav file so... it's pretty obvious how crappy that is... and that's about all I found on the net since … | |
Can anyone help me with this java problem? Here's the problem: "Write some code to demonstrate inheritance polymorphism. Create a superclass class with 3 subclasses. The superclass should have a method that prints out a line identifying the current class (something like "I am a Superhero"). Two of the subclasses … | |
Is there any [I][U]relationship[/U][/I] among the [U][I][B]bounds[/B][/I][/U] of a [B]type [I]parameter[/I][/B] in [B]Generics[/B] i.e. whether they are channeled([B][U]subclass[/U] or [U]superclass[/U][/B]) [U]uniquely[/U] [I]sequencially[/I] or [COLOR="Green"]differently[/COLOR] ? :confused: We use [COLOR="Red"]extends[/COLOR] clause once to inherit some only one class and to inherit others we have to [COLOR="red"]implement[/COLOR]. But for multiple bounds in … | |
In which package is Grid(in-built) class is there? I guess util. But Grid creation using create() shows error. | |
Hello. I'm not really sure on how to explain the problem, but here goes. I'm creating a Traffic Simulator of a cross junction. I currently have car objects moving, with working traffic lights. I created a variable array for the car class which creates several car objects. Then the lane … | |
i have a codelike this: [CODE] do { int i; }while(i!=0); [/CODE] Shows error "Cannot find symbol i" | |
Write a java program to repeatedly get two numbers from the user and display the sum of their squares. User numbers and result are real numbers. Repeat this interactive input/output until the first number exactly matches the sentinel value 990. Do not process the input matching the sentinel value. For … | |
i'm a beginner in coding and i try to write a parking lot program. There are 3 classes in my program. Could anyone help me out ,I got stuck in the record class which is datetime in and out and how to set overtime price. ****sorry about my bad english. … | |
I am developing a tool using java swing. In it I have to read a .vbs file. I have used the following code for it. Scanner fileReader1 = new Scanner(new File(fileName),"US-ASCII"); while (fileReader1.hasNext()) { System.out.println(fileReader1.nextLine()); } where fileName is valid .vbs file path This is working only for .vbs files … | |
hey guys i got this new project for my java class and got the overall idea but my code still does not seem to work ...here are the directions: - make a 5X5 boolean array assign 5 random elements for 5 ships - user can have 15 guesses to find … | |
Hi everyone, I have to read a RGB image and then convert it to YUV. Could any one please tell how should i do this? Thanks. | |
[CODE] private void depositButtonActionPerformed(java.awt.event.ActionEvent evt) { AdminLoginPage adminLogIn = new AdminLoginPage(users.get(accountNumber).userName, "deposit", users.get(accountNumber).balance, Double.parseDouble(depositAmountTextField.getText()), users); adminLogIn.setVisible(true); customUserDetails1.setText("Welcome " + currentUserName + "! You Have $" + (adminLogIn.getBalance()) + " Available."); depositAmountTextField.setText(null); } [/CODE] AdminLoginPage is a JFrame Constructor Class that displays a certain users account information and asks for an … | |
Hell can you help me on this,how can i insert a new node in the binary tree and to keep track the current node example: input number: 50 Succesfully inserted! input number:40 this will print "inserted at the left of 50" input numbr: 80 this will print "inserted at the … | |
Hi, sorry a bout this question but I have no Idea how I would texture something drawn by using glDrawElements? From what I gather you need to use glTexCoordPointer? but I'm still really confused. [CODE] public class DrawWater { public Expr2 func; // The function that is being drawn. private … | |
Help me in correctinf the errror i encounter here, i want the image file i have selected using Jfilechooser to be set on the image panel. i tried this but it failed: picthandler.setImageIcon(file); Here is the class Code , i have commented exaclty whr i want the bug to be … | |
I am a beginner JAVA coder, and yes this is a homework assignment for a online class... I am stumped, and cannot get help fast enough when it is 11pm at night :<) To better explain, I need to be able to have four methods. My first method contains all … | |
I am trying to write this program to get a user inputed number of grades up to 15. I then need to add the grades, find the largest, smallest and average of the grades, and finally display the results. Here is what I have so far. I can get past … | |
Hey everyone, and thanks for taking the time to read my post. Basically, I have a JFrame called "loginPage", that, well, is a login page. If a user logs into this page with the correct credentials, a new JFrame object called accountDetails opens (Or is constructed). Now, Is there a … | |
I am trying to create an applet for people to enter information, and the program should return a certain stat. However, after the user inputs all of the necessary information, no data is returned but this error message is: Exception in thread "main" java.lang.NullPointerException at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:991) at java.lang.Double.parseDouble(Double.java:510) at Player.toDouble(Player.java:110) … | |
can anybody describe me about java speech api with an sample code, and also how to get the java speech package and how to use in netbeans software?????:( rely me as soon as possible | |
The monthly payment on a loan can be calculated using the following formula: amount * R monthly payment = -------------------- -N 1 - (1 + R ) where: amount is the amount of money borrowed R is the monthly rate of interest for the loan N is the number of … | |
This will not run, and I am pulling it straight from the how-to.... [code] public class add { public static void main(String[] args) { int sum = add(5, 2); System.out.println("Sum is " + sum); public static int add(int firstInt, int secondInt) { return firstInt + secondInt; } } } [/code] | |
hello every one..I'm IT student i do understand it's logic and algorithm but I'm having hard time in programming.. I do hve weak foundation in Programming..can i ask help from u for my assignment? Problem: Write a program that reads student scores, gets the best score, and then assigns grades … |
The End.