4,084 Posted Topics

Member Avatar for mansoor_1

set value for each correct answer to 1, for each false answer to 0 and set at each time you enter a sollution: int total += answerValue;

Member Avatar for stultuske
0
155
Member Avatar for Voldemort2

it would also be good practice to try and understand why you need escape characters there, and why you can't just replace the \ and " chars.

Member Avatar for stultuske
0
135
Member Avatar for BlackGazer
Member Avatar for contra_shadow
0
347
Member Avatar for Assim_

[QUOTE=hfx642;1597280]Windows already has this built into the operating system. They are call "User Accounts".[/QUOTE] the OP never said he is using windows. well, I assume it is possible to write a login app that runs on starting up the computer, that asks for a login and hides everything else untill …

Member Avatar for hfx642
0
117
Member Avatar for sirlink99

shujin: besides the fact that this is a two year old thread... this is not a "gimme codez" forum. do some work yourself.

Member Avatar for Ezzaral
0
182
Member Avatar for sirlink99

can't explain any of that .. maybe when you show us your code, we'll be able to 'shine a light' on it, but just out of the blue ... nope, can't help you there.

Member Avatar for mKorbel
0
2K
Member Avatar for rsandp

what do you mean "configure textpad"? are you talking about the configurations you need to do to be able to write java programs in notepad? there is no configuration needed. you need to install a JDK (Java Development Kit). you can find this at [URL="http://www.oracle.com/technetwork/java/javase/downloads/index.html"]Oracle's download section[/URL]. After that, you …

Member Avatar for Sadun89
0
337
Member Avatar for by_stander

tons of differences ... for instance: [Code=Java] double[] var = {15.0, 0.0}; [/Code] creates an array of two doubles. your length is fixed, so, don't ever try to add a third element. a List on the other hand will automatically add room for more elements if you add one too …

Member Avatar for by_stander
0
7K
Member Avatar for cazaletm
Member Avatar for Jessurider

pretty sure packing it in a jar file would increase running speed :) all fun aside, as NormR1 mentioned, show your code. we can't just go around and unzip-install-compile and run the entire project for everyone who posts a question about their code. their are several reasons why your code …

Member Avatar for teo236
0
141
Member Avatar for saadismail85

> start quote: import java.util.Scanner; public class Dia2{ public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("Please Enter a Number: "); int num = input.nextInt(); System.out.println(); //this is the first shape which start from top to bottom for(int i = 1; i <= num ; ++i){//how many rows …

Member Avatar for stultuske
0
816
Member Avatar for akasekaihime

[QUOTE=akasekaihime;1593335]can you help me correct my java code......I do not know what is wrong with it... [/QUOTE] [CODE=Java] public static void main (String args[])throws IOException [/CODE] don't do this. where exactly do you think you're throwing this exception to? look at it as being a war: the main method is …

Member Avatar for stultuske
0
105
Member Avatar for sirlink99

how do you expect us to know this? what's the contents of the file, what do you expect to get, what are you getting, do you get error messages, ... just skimmed your code ... I think I know what your problem is: change [Code=Java]int inFile = 0;[/Code] into [Code=Java]String …

Member Avatar for NormR1
0
276
Member Avatar for xThrash

ArrayIndexOutOfBoundsException means that you try to assign - read an element of an array that doesn't exist. for instance: [Code=Java] int[] intRow = new int[5]; intRow[5] = 5; [/Code] this will throw an ArrayIndexOutOfBoundsException, since you're trying to assign an element (intRow[5]) that doesn't exist. the row just has 5 …

Member Avatar for stultuske
0
882
Member Avatar for register86
Member Avatar for stultuske
0
85
Member Avatar for xhalcyon

Oracle provides you with a basic yet solid step-by-step tutorial on how to write an applet, right [URL="http://download.oracle.com/javase/tutorial/deployment/applet/"]here[/URL].

Member Avatar for sirlink99
0
107
Member Avatar for skiabox
Member Avatar for Majestics

you might want to take a look into the [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/text/DateFormat.html"]DateFormat[/URL] class.

Member Avatar for debasisdas
0
162
Member Avatar for PHIPH

I agree with JamesCherrill here, but maybe one thing I would add as a posibility for beginners: Notepad++ => this allows you to have several files open at the same time, by using tabs. a lot easier to switch between them than switching between different screens.

Member Avatar for jwenting
0
182
Member Avatar for newcuser

jep, printing seems (one) of the logical mistakes he made. also, the fact that he forgot to replace the standard values of his instance variables with the values he provides through the constructor, but you've already changed that. @newcuser: just taking a wild guess here: when you're printing your elements, …

Member Avatar for stultuske
0
440
Member Avatar for skiabox

it basically decides who can access the method. public -> everyone protected -> package level and subclasses

Member Avatar for stultuske
0
77
Member Avatar for zahidmaqbool
Member Avatar for new_developer

another approach would be: 1. set int age to -1; 2. input age; 3. if age < 0 no age or invalid age given by user else run application

Member Avatar for JamesCherrill
0
48K
Member Avatar for AurosGamma

to write quality code: if you're familiar with the OO concepts and the java syntaxis, make an analysis of what you want to make. as JamesCherrill suggested, UML would be thĂ© way to go. once you have this, you should be able to get a clear view of what and …

Member Avatar for stultuske
0
141
Member Avatar for kukuruku

that error means you've given an invalid length for your arrays. you're trying to access an element of an array that doesn't exist. for instance: [CODE=java] String[] arr = new String[3]; // create a String array which will be able to hold 3 elements, being: // arr[0]; the first element …

Member Avatar for stultuske
0
99
Member Avatar for syeda amna
Member Avatar for syeda amna
0
79
Member Avatar for winecoding

what OS are you using? if you're using Windows, look at [URL="http://wso2.org/project/wsas/java/1.1/docs/setting-java-home.html"]this[/URL] for a basic and easy tutorial to set your environment varialbes, otherwise, or if you want another way to set them, take a look at [URL="http://jonas.ow2.org/doc/tutorial/src/html/configuration.html"]this[/URL].

Member Avatar for stultuske
0
251
Member Avatar for tom543

not even taking the time to post the entire assignment? this must be "really urgent"...

Member Avatar for tom543
0
194
Member Avatar for Chicken80

you need to remove one '}' right before your main method. you've closed your class before you started your main method, which is why it can't be found.

Member Avatar for jon.kiparsky
0
353
Member Avatar for marsangel

or, you could realise that a jar file IS an executable file. just stick to the .jar file, instead of creating an exe file. why doing this? an exe file is a windows-executable file, which won't run unless the user is running windows as an OS. by just keeping the …

Member Avatar for marsangel
0
101
Member Avatar for hinaraees

you could take a look at [URL="http://www.jguru.com/faq/view.jsp?EID=123229"]this[/URL]

Member Avatar for BestJewSinceJC
0
143
Member Avatar for MasterBerd

[QUOTE=harinath_2007;1589926] If you are very good in java basic concepts , then try to prepare for Sun certified java programmer (SCJP) from now onwards...[/QUOTE] off course, SCJP does no longer exist. the name has been changed when Oracle took Java over from Sun. well ... actually, the most known 'contests' …

Member Avatar for harinath_2007
0
155
Member Avatar for ssdeep

[QUOTE=ssdeep;1589949]if i have information like this a->b->c->d->MESSAGE,how do i tokenize it such that i get a,b->c->d->MESSAGE from the original string???????????[/QUOTE] well ... if you used a StringTokenizer here, with "->" as separator, you wouldn't. you would get {"a","b","c","d"} now ... what exactly do you need? do you need the first …

Member Avatar for stultuske
0
151
Member Avatar for bangor_boy

[QUOTE=bangor_boy;1581361]Learning about Abstract classes and interfaces, is there anything else I have forgotten about? [B]Abstract Class[/B] 3.Abstract methods with no body 4.A class extending the abstract class does not need to use all the abstract methods from the abstract class. [/QUOTE] a few remarks here: 3. just because the class …

Member Avatar for stevanity
0
249
Member Avatar for steve_Student

what exactly do you want help with? do you want us to check your code for errors, than please post your code. I'm pretty sure you understand the concept of intrest and percentage, so you should be able to work out the logic on yourself.

Member Avatar for Ezzaral
0
312
Member Avatar for winecoding
Member Avatar for naffan

well .. you have String values of your input in your String args. so, considering you calling methods in the same class as your main method, I would assume you have two possible solutions: 1. you create a couple of static class variables, in which you store the values you …

Member Avatar for naffan
0
392
Member Avatar for syeda amna

for a SERVER -> you have (for instance) tomcat, jBoss, resin, ... SERVLETS are java objects which (usually) extend HttpServlet, which you write yourself. now, how extended is your knowledge of overall java development? if you have some what a base to start on, I'm sure you'll find enough resources …

Member Avatar for syeda amna
0
209
Member Avatar for aiwasen

that'ssss great. but why not allow him to learn something? don't just hand out code, provide him with tips. not to mention that you're comparing chars in your sollution, where the job description would rather suggest an integer. since the OP has trouble printing lines and checking for the right …

Member Avatar for peter_budo
0
163
Member Avatar for akasekaihime

not to mention overwhelm poor first-time developers. where in the description does it say there is sorting or anything as such needed? all you need to do is enter three integers, and store the smallest and largest and display these. a simple comparison between two integers is more then sufficient …

Member Avatar for peter_budo
0
164
Member Avatar for gingerfish

to check for the equality of objects, you don't use the '==' operator, but you use the .equals method.

Member Avatar for gingerfish
0
921
Member Avatar for aiwasen

[QUOTE=aiwasen;1582806] please help me to program this in java!![/QUOTE] [Code=Java] public class Test{ public static void main(String[] args){ System.out.println("this"); } } [/Code] et voilá, 'this' has been programmed in java!! now ... be a nice boy, and stop spamming this forum. considering the date, I assume the year is comming …

Member Avatar for aiwasen
0
166
Member Avatar for Riteman

@hfx642 All the questions the OP could have about starting with Java are answered in (as masjiade suggested) the first thread in this forum. no need to copy them in here.

Member Avatar for Riteman
0
177
Member Avatar for lynnajoe

a quick glance, you have some big issues in there. for instance, in order for us to understand completely, you should best hand your entire code, so don't forget the Printer class. secondly, what do you expect to achieve by doing this? [Code=Java] Printer[] myPrinter = new Printer[5]; for (int …

Member Avatar for stultuske
0
153
Member Avatar for larrymtl

first remark: why do you put in two times the logic to print that asterisk figure? you could do something like (just the logic, not in Java syntax :P) boolean repeat = true; while repeat{ drawFigure(); print( "do you wish to draw again(Yes/No)") repeat = answer; } but, to go …

Member Avatar for larrymtl
0
213
Member Avatar for sowmya.m

No sowmya.m, we won't. 1. if you have a question, create a thread, don't revive one that 's been dead for a few years 2. put some effort in it. we're here to help you improve your code and to help solve errors you get, not to deliver custom-code, we're …

Member Avatar for stultuske
-2
86
Member Avatar for kwins

well ... are you studying it, or are you following a course which expects you to study it? these questions handle the basics of the basics ... if you get this ten questions as a test, and don't pass ... well ... no offence, but if you don't get at …

Member Avatar for masijade
-1
206
Member Avatar for kukuruku

[Code=Java] int [] den=null; [/Code=Java] this is why ... before you want to set values like this: [Code=Java] den[i]=denom; [/Code] you have to set a length for the array, for instance: [Code=Java] int[] den = new int[5]; // creates an int - array with 5 elements [/Code] this 'll also …

Member Avatar for stultuske
0
73
Member Avatar for jason830
Member Avatar for bhartman21
0
228
Member Avatar for arka.sharma

well ... as JamesCherrill suggested: READ the message, don't just copy paste it. Expected class javax.xml.bind.annotation.XmlAccessType but found class javax.xml.bind.annotation.AccessType there 's your problem

Member Avatar for stultuske
0
199

The End.