32,204 Topics
| |
Can anyone pointed out what is wrong with this code. I got an annoying error something with Scanner method. import java.util.*; import java.io.*; //import java.lang.System.*; public class cTedit implements ICommand{ @Override public void Execute() { InputStream istream; OutputStream ostream = null; int x; final int EOF = -1; istream = … | |
//hello.java import java.rmi.*; public interface Hello extends java.rmi.Remote String sayHello() throws RemoteException; } //HelloImpl.java import java.rmi.Naming; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; public class HelloImpl extends UnicastRemoteObject implements Hello { public HelloImpl() throws RemoteException {} public String sayHello() { return "Hello world!"; } public static void main(String args[]) { try { HelloImpl … | |
I have a source code here that counts the frequency of alphabetic characters and non-alphabetic characters (see the source code below). import java.io.*; public class letterfrequency { public static void main (String [] args) throws IOException { File file1 = new File ("letternumberfrequency.txt"); BufferedReader in = new BufferedReader (new FileReader … | |
Hi All, I am new to webservices.I am using eclipse,tomacat6 and axis2. When i was converting a class to webservice upto WSDL creation was done.After that i was getting error like [B] IWAB0014E Unexpected exception occurred.[/B] and details are[CODE]IWAB0014E Unexpected exception occurred. The char '0x0' after 'return code: 502 <HEAD><TITLE>Connection … | |
I have this code that outputs the tfidf for all words in each file in the directory. I'm trying to transfer this to a matrix where each row correspond to each file in the directory and each column to all words in the files and I have some difficulty in … | |
Hi everyone I have a question and I need your help I want to sort an array but I dont want to change the index I mean if I have an array Array[6,5,4,3,2,1] it will be like this 0 6 1 5 2 4 3 3 4 2 5 1 … | |
Suppose I have the following generic classes; Queue<T> KellysCoffee CheckOut and the following generic interfaces QueueInterface OrderLineInterface Suppose I want `KellysCoffee` to extend Queue class and implement `OrderLineInterface` This is how I've done it private class KellyCoffee<Order extends Queue<Order>> implements OrderLineInterface{} Now when I try to implement `CheckOut` public class … | |
Similarly, you can add more fields to an enum and simply provide accessor methods to retrieve them. For example you could change it to have an extra field indicating an output directory to write specific types of data to, and a getter method to return that directory. | |
i was tasked with writing a program that prints the question ”Do you want to continue?” and reads a user input. If the user input is ”Y”, ”Yes”, ”OK”, ”Sure”, or ”Why not?”, print out ”OK”. If the user input is ”N” or ”No”, then print out ”Terminating”. Otherwise, print … | |
Hello guys, I'm completely losing it. The question asks to emplement an electronic directory traverse in size a chosen folder (using JFileChooser)and print the structure with the calculated the size of each folder and file. Finding the file size is easy using File.io `getSize()`. However, to find the size of … | |
i wrote a program that have four classes .one of these classes is Date : class Date { public Date(int year,int month,int day) } in other classes there are some method that one of they're input is Date for example public void f(Account account ,Date date) i want to write … | |
Is there any simple way to create a txt file with its name come from the user input. Also the file will be stored in a specific location such as C:\Users for example. Here is what I do but doesn't work. import java.io.File; import java.util.Scanner; public class cITF implements ICommand{ … | |
**This is intented for learning purposes, feel free to study the code** Create a drawing that looks like this (pyramid) The number should be incremented with the modulus. | |
Have first part of program written. It will use enum array for month and average rainfall amount. It starts at January and runs through December. Second part is to ask user at what month they want to start (example, April). The printout would then start at April of year -1 … | |
I need to put this http://www.khanacademy.org/cs/chaos-pong/4810465738752000" into a web page .But I don't know how i can do this.Please any one help me thanks. | |
hi , i want to add code to edit text feild (Jdatachooser ) in my code , how it ? i have attribute ( Date ) type Date to mysql . how to add below code ? try { String va_ID = txt_idParking.getText(); String va_numCar = txt_numCar.getText(); String va_Modelcar = … | |
All, what I am trying to do is isolate markings (differences) in images. I have an unmarked image (I1), a marked image (I2) and a third image (I3). I would like to compare I2 against I1 and store the x,y (or array of pixels) of the differences (isolate markings). I … | |
Im trying to write a code where the user inputs an expression and then prints the answer and the postfix expression my problem is the parenthesis are all off and I'm not sure how to get them to print normal or even do without the parenthesis at all For instance, … | |
i intend to do my project of making browser or media player in JAVA.i need help..someone please guide me how to go about it...and someone has any other bright idea of some other project which he has made or which is unique in nature..please advice and help...will be grateful for … | |
how read from file and set txte in jTextArea(use IDE netbeans ) | |
I don't understand how JVM is so small. And also how it use memory in each device? Why do we have to understand about it. | |
Hi, i'm trying to build a transaction reconciliation tool. For which i'm using permutation combination. I have total of n transactions from which m transactions must i have to take.On rest n-m transactions i want to apply permutation combination. How can be that possible. Please help | |
Ok, so I just made this account because I'm super stuck. Basically I need to create a math quiz that takes a users input (1 through 12), have it spit out a question, i.e What is 5 x 12? however if the user enters 5, it must randomly generate a … | |
I have now official decided that I would delve deeper in the world of computer engineering and software development. I am currently studying Java in my introductory course at school. While we're talking about arrays, loops, and string manipulation, I was curious about the idea of throwing exceptions. Let me … | |
Hi all, I have a J2EE web application that I am integrating with LDAP to implment Password Reset functionality to allow AD users to change their own password. My code works at times, and sometimes it stops working throwing [code]LDAP error code 52, initializing SSL/TLS error.[/code] I don't know why … | |
I'm a student who is interested in coding his own Minecraft mods and there by hoping to learn Java Code. I have already taken many courses on line (Youtube) but those courses only take you so far and they DO NOT help you out if, by some chance an error … | |
I am trying to understand the structure of .class file in Java. Wrote a very simple program : package javautilities; public class Class_File_Structure { public static void main(String[] args) { int a = 10; int b = 20; int c = a + b; } } used the command javap … | |
I am thinking of making a website, which is a quite big one and may need scalability later on. I know a little bit of asp.net , php and j2ee but not much, so before I start I want to know which language would be the best choice to make … | |
this is my code, the problem the compiler is saying is i need an extra parentheses after 5 in get fahr, but i know that cant be it... help meeeeeee please :) public double getFahr() { if (tempUnit.equals('C')) { return (5(tempNum-32)/9); } else { return tempNum; } } public double … | |
I's like to simulate the behaviour of Dynamixel Pro's robot actuator, including the control table, please see [it here](http://support.robotis.com/en/product/dynamixel_pro/control_table.htm). I can simulate the robot actuator fine, but simulating the control table is a bit puzzling for me. The control table has address from 0 - 892. One way I can … |
The End.