36,051 Topics

Member Avatar for
Member Avatar for david cashin

I have a website that i have uploaded an applet to. In the same dir as the applet, I have uploaded three textfiles that the program uses. The applet works perfectly in the appletviewer runing off of my computer, but when i upload the class online it seems that the …

Member Avatar for kvprajapati
0
147
Member Avatar for itsmeisuru

[code] if (a>b || a==2){ System.out.println("yes") } [/code] [quotes] in if command it gives an error, sayin operator || can not be applied to a boolean. I want to know how to use the and &&, or || operations in java.. [\quates]

Member Avatar for staneja
0
136
Member Avatar for pavansathar

hi, i am developing a mobile application for my company, but i am having some problems storing and retrieving data from my database which is located in my server. Does any one know how i can do it. Using rms will only get the data out from the server stored …

Member Avatar for pavansathar
0
109
Member Avatar for doha786

hi, i am trying to build a simple program where system asking info (name,age,sex & location) to make a table using do-while loop. for each info will create one new row in table that i dont know how to make.. please help me... here, i made for one single row …

Member Avatar for javaAddict
0
467
Member Avatar for vidhun
Member Avatar for Rmj001

Can anyone tell me where I am going wrong with my code? I keep getting two errors stating ';' expected (on lines 22 & 23). I am new to this so I am not sure what I can post and what I can't, so I am just going to post …

Member Avatar for Rmj001
0
341
Member Avatar for nicklbmx

So the problem comes in, in the last method called printComparisonResults. I just have no clue what to do?? Thanks for your time! My Class: [CODE] //StudentRecord //Nick Elliott 02/01/10 import java.util.Scanner; import java.io.*; // A StudentRecord contains a student's first name and their gpa public class StudentRecord { private …

Member Avatar for apegram
0
170
Member Avatar for akonful

I am developing a code to find the occurence of digits in a string. I need help. When it compiles I get the error: cannot find symbol variable countDigits

Member Avatar for apegram
0
191
Member Avatar for xxunknown321

My assignment: Create a class with a method that accept a charge account number as its argument. The method should determine whether the number is valid by comparing it to the following list of valid charge account numbers: 5658845 4520125 7895122 8777541 8451277 1302850 8080152 4562555 5552012 5050552 7825877 1250255 …

Member Avatar for xxunknown321
0
395
Member Avatar for Bemani_lover

Ok, so I need a bit of help on a small project I'm working on. Here's the run down of it: Write a Java program that allows the user to enter tests grades for yourself. The application should prompt the user to enter how many tests they wish to enter …

Member Avatar for peter_budo
0
144
Member Avatar for Austinjs0102

Basically i need to use JOptionPane and have the user enter a name followed by a . (dot) and a file extension. After they have done that the output should be the extension name without the dot. Ex Please enter a file with dot extention > new.html You choose html …

Member Avatar for mohammedsohaib
0
235
Member Avatar for rwildman23

Run the program and you'll see I am not filling the arrayList but am invoking the toString method. Obviously this is not giving me the desired output. What's wrong? (I did not post the other classes because I don't think my error is there but if anyone needs them let …

Member Avatar for javaAddict
0
107
Member Avatar for javaAddict

I had a problem at work which I solved, but that raised me another question. I wanted to export a page to excel, so I used this: [CODE] response.setContentType("application/vnd.ms-excel;charset=iso-8859-7"); [/CODE] It worked but while I was searching for an answer I found 3 possible content types for the excel: > …

Member Avatar for javaAddict
1
929
Member Avatar for thekashyap

Hi, While trying to debug some performance issues, we narrowed down the problem to calls to Entity Beans taking long time. Original design is nice and generic but does not scale up in this case. Here are the details: - J2EE application. - Oracle DB - Entity Beans used for …

Member Avatar for jwenting
0
185
Member Avatar for ricss_madara

how to write an application that reads in a five digit integers and determine whether the number is as palindromes or not e.g 12321,11611.If the number is not five digit long, display an error dialog, allow the user to enter a new value.

Member Avatar for jwenting
0
113
Member Avatar for java..

[CODE]public class array{ public static void main(String[] args){ int num[] = {80,20,47,82,25,13}; int l = num.length; int i,j; System.out.print("Given number : "); for (i = 0;i < l;i++ ){ System.out.print(" " + num[i]); } System.out.println("\n"); System.out.print("Accending order number : "); for (i = 0;i < l;i++ ){ //int temp=num[i]; for …

Member Avatar for staneja
0
190
Member Avatar for shahali88

hello i m ali i m new to jsp please tell me about how jsp runs in openwave

Member Avatar for peter_budo
0
51
Member Avatar for musthafa.aj

hai! i created jar file that will be extractable in any way... but what i need is don't to be extractable... how do seal it from others seeing by extracting it... any general idea please.....

Member Avatar for jwenting
0
131
Member Avatar for akonful

I need help with my class assignment. I am supposed to write a java program to count the number of digits in a string using: [icode]public static int countDigits(String s)[/icode] can anyone help...I cant seem to figure it out from what I have [code]public class Ex8_5 { public static void …

Member Avatar for BestJewSinceJC
0
100
Member Avatar for deepu.bhanu
Member Avatar for javaAddict
0
152
Member Avatar for Austinjs0102

Alright i am writing a program to read a sentence you write and judging by you punctuation it will tell you whether its a statement, question, exclamation or other. My problem is that it isnt running my If statement. am i just bind and missing something. [CODE]/* * To change …

Member Avatar for staneja
0
315
Member Avatar for mseck

I would like to create a java prob that will request three integers from a users and have it printout the sum and product as such: the 3 different integers are : 13, 27, 14. the sum is 54 The product is 4914 Completed Have i programm the right way: …

Member Avatar for staneja
0
103
Member Avatar for shiv0013

[CODE] package Sample; public class Sam { public static void main(String[] args) { R obj[] = new R[100]; obj[0].current=0; } } [/CODE] [CODE] public class R { int current; } [/CODE] when executing this code i am getting null pointer exception. while debugging at "obj[0].current=0 " it shows as malformed …

Member Avatar for PersonalIT
0
1K
Member Avatar for losh177

hi, i'm having problems with the output. I do not get anything when I select 4 and enter a binary number. Here is my code, if anyone could point out what i'm doing worng, thanks. [CODE]import java.util.Scanner; public class Driver { public static void main(String [] arg) { LineWriter Lw …

Member Avatar for losh177
0
115
Member Avatar for deftech69

I have a general question about searching inside a two-dimensional array. I'm working on a number search program that allows the user to enter a number to search in a grid of numbers. For example: User wants to search: 234567 In a grid of: 232772725432 734234657337 272425672442 235533655737 252444474436 737533255325 …

Member Avatar for deftech69
0
2K
Member Avatar for selenask

Hello, Im trying to create file . I'm almost done my program but Im getting this error. The method read() is undefined for the type Scanner

Member Avatar for selenask
0
94
Member Avatar for jemz

hello please help me i have 2 txtfield then to be inputed first name and last name then after i click the add button the txtfield will clear and when i click the search button it will display on the JTable my problem is that how to put indicator to …

0
58
Member Avatar for fardoonmuhafiz

If a class doesnt override toString() method and tries to print out the object like this: //some class [code] public class SomeClass1{ int x=4; } //another class class DemoOftoString { public static void main(String[] args) { SomeClass1 o=new SomeClass1(); System.out.println(o); } } [/code] output:SomeClass1@hex version of object's hash code ------------------------------------------ …

Member Avatar for fardoonmuhafiz
0
101
Member Avatar for jemz

please help me how to make on how to get txt on a file...hoping for your positive responds.....

Member Avatar for jemz
1
103
Member Avatar for jemz

hello please help me on this how to write on notepad....example input your first name input your last name input your middle initial input your address input your age this should be the ouput in notepad after inputting the data and this should be proper align .thanks in advance..hoping for …

Member Avatar for javaAddict
0
3K
Member Avatar for by89

Sorry this is the first time posting so if there is any wrong placement of thing, i apologize. Basically I'm trying to retrieve all the field of the food by typing the foodname and display it into the addfood.jsp. There are 2 class and 1 jsp which is foodmanage.java where …

Member Avatar for musthafa.aj
0
187
Member Avatar for qadeer37

[code] interface Cricket { public void Pitch (String type); public void Seats (int num); } class Arrangement implemets Cricket { public void Pitch (String types); { System.out.println (types); } public void Seats (int nums) { System.out.println (nums); } } public Class Match { public static void main (String arg) { …

Member Avatar for stultuske
0
170
Member Avatar for yasin.mr

hi guys a beginner here. can i get some help ? how do i prevent error for eg. i only one Y/y or N/n to be written and when other characters or integers are written, it will show an error message. the default doest seem to be working switch(Confirm) { …

Member Avatar for yasin.mr
0
287
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
257
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
134
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
777
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
725
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
84
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
218
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
215
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
130
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
147
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
105
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
117
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
89
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
157
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
116
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
57
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
160
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
111

The End.