32,199 Topics

Member Avatar for
Member Avatar for hket89

How to generate a pair of random number from 1 to 8 that can fill into a 2D array in a 4x4 square? For example: 2 3 5 6 1 7 8 3 5 4 1 6 7 2 4 8

Member Avatar for hket89
0
132
Member Avatar for Katherine692008

Hello, I'm currently stuck on this program and wondering if I can find assistance > This programs should prompt users to > enter number(s) (integer(s)) <enter> multiple scores on the same line > see a grade(s)<enter> > then see a sum of the grades entered (abcdf). > > > It …

Member Avatar for Jhonjay123
0
775
Member Avatar for soteri0s

Hello everyone, I'm trying to compare Strings in a Linked List that were input by user and return the smalles(lexicographically) to the console. Any help is appreciated. ** actual method [CODE]public String smallest() // Returns smallest String in StringLog in terms of lexicographic ordering. //Precondition: StringLog is not empty. { …

Member Avatar for BestJewSinceJC
0
724
Member Avatar for Austinjs0102

Alright i need some help, been stuck on a basic task. I input 2 strings. I need to be able to have it compare the two strings to see which one is shorter, then count how short the item is and out put the number. ex. Word 1 Hello word …

Member Avatar for BestJewSinceJC
0
80
Member Avatar for RSBColt

I am trying to write a reflection bot for [URL="http://runescape.com"]runescape[/URL]. I am stuck at the part where I add hooks to the client to get the values of the variables. I already wrote the loader. The problem is, the runescape client is obfuscated, so finding hooks is a challenge, and …

Member Avatar for jwenting
-1
215
Member Avatar for rgpii

I believe this is the appropriate forum, but if it is not please let me know and I will move it to the OSX forum. I have an assignment that requires me to play with a specific jar file. I am currently running OSX 10.6 and I have Java 6 …

Member Avatar for rgpii
0
201
Member Avatar for manikandan_dani

Hi, I am developing xml editor using jsp and servlet. In this case i am using DOM parser. using that i getting all the element, text, xpath form xml file with help of DTD. Upto this it will be working, and it save back into xml file. While save into …

Member Avatar for manikandan_dani
0
126
Member Avatar for mseck

I tryed to compress my file but got two errors: Can someone see that could be wrong? [CODE]import java.util.Scanner; public class Lab1 { public static void main(String[] args) { // create a Scanner object Scanner sc = new Scanner(System.in); // read a string System.out.print("enter product code: "); String productCode = …

Member Avatar for javaAddict
0
145
Member Avatar for beforetheyknew

Hi guys just wanting some help with exceptions. I understand the try and catch concept but I struggle more with the throw and throws concept, it is my understanding (that may be incorrect), that you a method can be like [CODE]public class thisMethod throws whateverException[/CODE] Am I right in thinking …

Member Avatar for BestJewSinceJC
0
102
Member Avatar for Sri Vidhya

I tried executing this program, it says, C:\Program Files\Java\jdk1.6.0_18\bin>java ClassWithManyStaticMethods Exception in thread "main" java.lang.NoClassDefFoundError: ClassWithManyStaticMe thods Caused by: java.lang.ClassNotFoundException: ClassWithManyStaticMethods at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: ClassWithManyStaticMethods. Program will exit. What is the problem? I clearly …

Member Avatar for AndreiDMS
0
114
Member Avatar for vinoli

My java program is not executed.I saved it in mydocuments.It is in MS-Dos batch file.What should i do to execute it?

Member Avatar for javaAddict
0
86
Member Avatar for anevins

My program will not output the right answer if minus/negative doubles are inputted however the program will output the correct positive double. I think this is because I haven't used the Math.abs correctly but I don't know how to fix this. My code is as follows: [code] public static void …

Member Avatar for Zaad
0
152
Member Avatar for low1988

[CODE] import java.net.*; import java.io.*; import java.security.*; import javax.crypto.*; public class messagedigestsend { public static void main( String [ ] args) throws Exception{ byte ttl= (byte) 0; try { MulticastSocket mSocket = new MulticastSocket(); MulticastSocket mSocket2 = new MulticastSocket(); InetAddress mAddr = InetAddress.getByName("224.0.0.1"); String sendString = "M"; byte[] plainText = …

Member Avatar for thekashyap
0
112
Member Avatar for thosecars82

Hello I would like to know whether there is any Java API available including access to a stock screener like those from either Google or Yahoo. [url]http://screen.yahoo.com/stocks.html[/url] [url]http://www.google.com/finance/stockscreener#c0=MarketCap&c1=PE&c2=DividendYield&c3=Price52WeekPercChange&region=us&sector=AllSectors&sort=&sortOrder=[/url] Thanks

0
54
Member Avatar for anevins

I need to use the valueOf method to return a string representation of a boolean arguement but I don't know how to use this method. Here is my code at the moment, if the inputted file name ends with .txt then 'true' is returned, if not then 'false' is returned. …

Member Avatar for thekashyap
0
158
Member Avatar for k_green

i am final year engineering student i have to make last year project so i need some topic pertaining to web application or software development.please kindly suggest me some new topics (using java).asap

Member Avatar for verruckt24
-1
108
Member Avatar for kazmi_salman

Hi there! Need help wid this. i need to change all the uppercase characters to lowecase and vice versa. when i compile it shows cannot find symbol on line 13 and 18. Kindly help. Also tell me how to make the first letter of each word in uppercase. thnx in …

Member Avatar for kazmi_salman
0
107
Member Avatar for jhessica

i got some problems in making codes for our Hotel manangement sysytem, it is my first machine problem that my professor given to me...it was really hard for me!can you help me? tnx...

Member Avatar for BestJewSinceJC
0
86
Member Avatar for rickywh

I'm using a socket server that is based off of java and it allows java extensions to be implemented that allow server side login to be performed. I want to create a signup/login system but I'm struggling with finding a way to validate/filter user input before manipulating with the database. …

Member Avatar for BestJewSinceJC
0
169
Member Avatar for doha786

hi, i have a TextField in myGUI where some data(results) are shown after calculation. I have a 'save' button to save this result into a particular txt file.. i almost done without error....but inside my txt file it shows this kind of things: [QUOTE]ava.awt.datatransfer.StringSelection@157f0dc [/QUOTE] Please anybody help me to …

Member Avatar for BestJewSinceJC
0
198
Member Avatar for sswati.sri

hi, I got exception"NoClassDefFoundException" at the runtime of this java code.My DSN connection is correct,sql server is also properly work,when my project excuted on tomcat.but my beans are not executed properly inly becoz of this connection error.plz give the solution to overcome this problem. [B]In my project i create connection …

Member Avatar for sswati.sri
0
240
Member Avatar for laelzio.mosca

I just started my Java class, and I`m trying to Install Jgrasp from [url]http://java.sun.com/javase/downloads/index.jsp[/url] I choose the first picture, the one that just says java, with the JDK. But after I install it, I still can`t find it in my computer. Can anybody help me. Thanks

Member Avatar for doha786
0
93
Member Avatar for caneko

Split from - [url]http://www.daniweb.com/forums/thread37189.html[/url] (manifest jar files???) i had this error too, i made a mobile application in netbeans, and know that it automatically generate a jar file once built, but wen i run it, that error occurs.. but the the jad file is running ok..

0
41
Member Avatar for TanWS

Hi All, I'am having trouble passing image take from j2me application to asp.net C# webservice. I tried converting the image in byte[] to base64 string and pass to webmethod that receive a string and received the following error. Please help! javax.xml.rpc.JAXRPCException: error 0 during TCP write at com.sun.j2mews.xml.rpc.SOAPEncoder.encode(+248) at com.sun.j2mews.xml.rpc.OperationImpl.invoke(+40) …

0
60
Member Avatar for bd338

Hello everyone! I use this method: [CODE] private void drawRectangles(Graphics g){ final int ROWS = getHeight() / 75; final int COLUMNS = getWidth() / 75; for(int i = 0; i < ROWS + 1; i++){ for(int j = 0; j < COLUMNS + 1; j++){ int x = j * …

Member Avatar for musthafa.aj
0
79
Member Avatar for syum

Hello, I have been working on file transfer in java using http POST. I'm able to to send text files to a server but I'm getting difficulty in sending binary data, like images, to a server. My main problem lies on how to use InputStream.read(buf, 0, dataLength). Here is my …

0
54
Member Avatar for iamsmooth

So if my program exits on a certain condition, it has to exit with a 1, and if something else, it exits with 2. So I want to use junit to assert that the exit code is 2, but I don't know how to do that. I also heard there …

Member Avatar for musthafa.aj
0
123
Member Avatar for mhina

[code] import javax.swing.*; import java.io.*; import java.io.InputStreamReader; public class Weight2 { public static void main(String[] args)throws IOException { double cost; double tax; cost=Double.parseDouble(JOptionPane.showInputDialog("Enter purchase amount")); double payment; payment=Double.parseDouble(JOptionPane.showInputDialog("Enter amount tendered")); BufferedReader CHANGE=new BufferedReader(new InputStreamReader(System.in)); tax=Double.parseDouble(CHANGE.readLine()); displayTax(getTax(cost,tax)); setPayment(payment); setTax(tax); setCost(cost); displayCost(getCost(cost,tax)); System.exit(0); } public static double getTax(double y, double x) { …

Member Avatar for musthafa.aj
0
151
Member Avatar for kiryoku

how can i remove an element in my array without using special commands like hashmap....i have made many parts of it...just the delete part... [CODE]import java.io.*; public class Super { public static void main(String args[])throws IOException { String temp; int num[]=new int[10], choice,index,value,i,search,found=0; BufferedReader in; in = new BufferedReader(new InputStreamReader(System.in)); …

Member Avatar for BestJewSinceJC
0
218
Member Avatar for nicklbmx

I need to figure out how to find the max number of an array by using a while loop. I have searched all over but do not understand how to do it. If I could get any help at all that would be great. Thanks! Anyway the findMax method is …

Member Avatar for BestJewSinceJC
0
90

The End.