4,084 Posted Topics

Member Avatar for manisha

@Farheen_3: not by reviving dead threads. start a new thread, show what you've tried, and we'll start from there.

Member Avatar for stultuske
0
2K
Member Avatar for overwraith

the error message is actually quite clear on what is going wrong. > Error Full Text: [ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. The indices that are valid for a(ny) collection are 0 to length-1. So, if your collection contains …

Member Avatar for stultuske
0
646
Member Avatar for overwraith

what is this supposed to be: public virtual int UserId { get; set; } ? Is there a reason why this part of your mapping file: table=""USER"" has two double quotes?

Member Avatar for overwraith
0
2K
Member Avatar for Dietrich_1
Re: Car

Your code is quite a bit ... goofy. Take a close look at what you have written, and see what you can improve where. An example: public void getGas() { double gas2 = 1.0/2.0 * tankCapacity ; if(gasInTank <= gas2) { gasInTank = tankCapacity ; } } why is this …

Member Avatar for JamesCherrill
0
892
Member Avatar for Dietrich_1

I've just posted in your other topic on that class, pointing out several issues with your code. (The thread you should have posted this in, btw, since having what is basically one question in several threads is confusing). I'm not going to copy paste it here, but just add a …

Member Avatar for stultuske
0
425
Member Avatar for Deamanjoe
Member Avatar for rproffitt
0
393
Member Avatar for nonik

is this a > Please do my homework for me post? then, no. first, be clear in what you are looking for. secondly, don't post C++ questions tagged with Java. but, just to help you out, I'll give you an implementation in pseudoCode: call spellOutAPositiveNumberWorthLessThan1000000 : spellOutAPositiveNumberWorthLessThan1000000 => return 75000000 …

Member Avatar for stultuske
0
388
Member Avatar for Stefce

easiest way, build a list with firstnames, build a list with lastnames,pick one of each at random and combine them. How is this a programming problem?

Member Avatar for taersious
0
950
Member Avatar for Dipayan_1

actually, no, we can't. databases don't have 'Arrays'. They have columns and records. I recommend looking over the basics of relational DB's (or, DB's in general) before even trying this. Spending five minutes more analysing it beforehand, can save you hours of reworking if after creation you realized you messed …

Member Avatar for pty
0
2K
Member Avatar for Shulc

asking more experienced developers whether they would be willing to do code reviews could also help. also: when finished coding, run it through a sonar cheking and see if you can solve any code-smells or issues that are detected.

Member Avatar for Reverend Jim
0
243
Member Avatar for Jason_24

also, just some remarks: public boolean equals(NewspaperSubscriber subscriber){ boolean result; if(street_address.equals(subscriber.street_address)){ result = true; }else result = false; return result; } 1. it is better to limit the number of lines code. it makes the code easier to read and understand, and it decreases the risk of typo's or other …

Member Avatar for stultuske
0
4K
Member Avatar for divinity02

JFrame frame = new JFrame("Calculator"); You are creating a new instance of JFrame to which you are adding all the components you want to show, but you only call `setVisible(true)` on the class itself. You haven't added the internally created instance of JFrame (which you don't really need at all) …

Member Avatar for divinity02
0
628
Member Avatar for annya
Member Avatar for ajelliott

mnyah, but since the last post is (almost) three years old, I doubt they haven't upgraded yet.

Member Avatar for Paul_49
0
1K
Member Avatar for Violet_82

I think Person is the right place, but it should take into account more possibilities: For instance, an appartment: can a housenumber only be numerical (1, 2, 3, ...) or do you take living units into account (1, 2a, 2b, 2c, 3/101, 3/102, ... ) What when you encounter a …

Member Avatar for JamesCherrill
0
1K
Member Avatar for emmstarr

Abhishek: welcome to the DaniWeb fora. Allow me, however, to explain something about the rules of this forum, which are upheld to keep it (easier) maintainable: 1. don't hijack a Thread. if you have a question of your own, start your own Thread. DaniWeb doesn't get billed per Thread started, …

Member Avatar for Jorge_12
0
5K
Member Avatar for vishalsingh1080

Start on the official website: [http://developer.android.com](http://developer.android.com/index.html). There you can get the tools, and information on how to get started.

Member Avatar for mack_5
1
474
Member Avatar for Adrian_11
Member Avatar for stultuske
-2
213
Member Avatar for PulsarScript

why not explaining what (you think) went wrong before providing copy-ready solutions?

Member Avatar for PulsarScript
0
600
Member Avatar for rhaylee

as far as I can tell, the comments in your code already hint to what you should do next. for `non- Integer` input, don't use the `nextInt();` method, and don't assign the value to an `int`.

Member Avatar for FC Jamison
0
383
Member Avatar for Violet_82

I hate to tell you, but if you are planning to use a UI framework (Vaadin) to implement business logic, you should first learn basic OO principles.

Member Avatar for JamesCherrill
0
1K
Member Avatar for oresnik

and storing the values is as easy as just saving values in an array/list. let's assume you take James' advice and use a list: @Override public void actionPerformed(ActionEvent event){ // if those buttons have the numbers as text on them JButton b = (JButton)event.getSource(); char text = b.getText().getChar(0); if ( …

Member Avatar for Shaun_4
0
2K
Member Avatar for Norman_2

That's a nice assignment. Do you have an actual question about it? When you registered to DaniWeb, you accepted the [posting rules](https://www.daniweb.com/welcome/rules), among which, you'll find: > Do provide evidence of having done some work yourself if posting questions from school or work assignments Copy pasting an assignment is usually …

Member Avatar for stultuske
-2
218
Member Avatar for Violet_82

Your unit tests should be able to tell you whether something in the application was 'impacted' on the migration to the new version.

Member Avatar for JamesCherrill
0
300
Member Avatar for Isky

Himanshu_8, Welcome to DaniWeb. Just let me point out a few things: 1. When using code blocks, put the entire code in them, it makes it clearer 2. Don't just post code, it doesn't explain anything. Rather answer with an explanation of how to get to the correct code, or …

Member Avatar for stultuske
0
21K
Member Avatar for geoffy0404

also: it's good that you show the startTime and stopTime methods, but as far as we can tell, they're not called anywhere.

Member Avatar for stultuske
0
761
Member Avatar for Saboor880

so, if I get it straight: You read all the data from the database then you create a report based on that data then you want to read all the data of that report (the data you already had) and display that data?

Member Avatar for stultuske
0
217
Member Avatar for Michael_56

Not to mention the fact that there is no "law" that states a project HAS TO provide information about it's version or build.

Member Avatar for stultuske
0
341
Member Avatar for Saurabh_13
Member Avatar for asifalizaman

one is a complete programming language, that can be used to create stand alone and web applications, the other is a scripting language, which can only run front-end in a webbrowser. it would be easier to answer the question: what do they have in common? 1. they both have 'Java' …

Member Avatar for _1_18
0
777
Member Avatar for Shellie_1

IMO it's not really a good recommendation. First of all, don't look for a book that's "for beginners". Look for a book that decently teaches and explains the material, so it can be used by both beginners and more advanced developers. A lot of books and tutorials out there that …

Member Avatar for Zycog
0
501
Member Avatar for beanboy

durgaselvam: start a new thread. also realize: html is static. you'll need another language, jsp, jsf, .. but not html.

Member Avatar for vk
0
4K
Member Avatar for BabaRoro
Member Avatar for Mar. Na.
Member Avatar for Mar. Na.
0
1K
Member Avatar for rajilakshmi

you could've created your own thread in which you ask for this, especially while showing your code. but since this is about jsp, you might as well post it in the jsp sub-forum.

Member Avatar for shabeer_1
0
5K
Member Avatar for enakta13

Govind: your answer is not correct ('\u0020' is NOT the same as null) and a year overdue. no reason to revive a dead thread.

Member Avatar for Stungkuling
0
16K
Member Avatar for nitin1
Member Avatar for nitin1
1
299
Member Avatar for Kachour

> Who can tell what is in the if statement and what is not with this formatting? Everybody who looks at the opening and closing brackets. The OP clearly stated: > My program was working fine until i introduced the if statement, without this "if" there are (java.lang.NullPointerException) errors . …

Member Avatar for AssertNull
-1
330
Member Avatar for vivekH

by putting the dependencies you need in your pom.xml file. after that, you can import (and use) the classes as if they were in the same module.

Member Avatar for stultuske
0
140
Member Avatar for michael_51
Re: java

please understand that copy-pasting your school assignment here will not make us eager to help you cheat, especially if you don't bother to put some effort in it yourself.

Member Avatar for stultuske
0
167
Member Avatar for Abdennour
Member Avatar for Zaal

[ReCaptcha](https://www.google.com/recaptcha/intro/index.html) is recommended quite often. (Also by authors of other captcha libraries) so it must be worth a look.

Member Avatar for happygeek
0
201
Member Avatar for KrullFX

@haris.nattukal: did you add anything other than what Freshly already mentioned 5 days ago? If so, please add some explanation of what and why you changed it, so the OP can learn from it, otherwise, I hope you realise the futility of posting this code.

Member Avatar for JamesCherrill
0
342
Member Avatar for Mar. Na.

change the names to AClass1_WhatIThinkShouldBeFirst AClass2_TheSecondOne But this makes no sense at all. If you're packages are hard to overview, you are using poorly chosen names, or have way too much classes in your packages.

Member Avatar for Mar. Na.
0
388
Member Avatar for modernfrt

richardsonka: please read the previous post, you're about a year late with your response. Also: use code formatting it makes it easier to read. Besides: why would one have to be a Java expert to be able to write sql code?

Member Avatar for stultuske
0
6K
Member Avatar for nadiam

to explain a bit more James' post (he's right, btw, that is your issue) if you put `String.id` your compiler will go looking for a static variable called `id` within the `String` class. Since there's no such variable, the compiler doesn't know how to deal with it. It's not a …

Member Avatar for nadiam
0
468
Member Avatar for vishalsingh1080

quote from the Java4K homepage: > ANNOUNCEMENT > Unfortunatly there will be no 4K contest for the period Dec 2014 to Feb 2015, and beyond. The reality is that Java has been in decline for a long time and now it's almost impossible for ordinary people to play Java games …

Member Avatar for vishalsingh1080
0
332
Member Avatar for rhaylee

do you expect us to download your code totally? just post the relevant parts here, with an explanation of what it should be.

Member Avatar for stultuske
0
163
Member Avatar for Elizabeth_9

I have no idea on which line the Exception is thrown, nor through what variable, but I'll try to explain what is going wrong. After that, check the line mentioned in the stacktrace and see if you can resolve your issue. Let's say you have a class Person: public class …

Member Avatar for stultuske
0
593
Member Avatar for spoch

SZJX: you do realize this thread is over five years old, and nobody is still following it, right? besides: "best solved by just calculating through all permutations". yes, wasting the system's resources is always "thé way to go". if you can minimize the number of permutations, you should. if you …

Member Avatar for JamesCherrill
0
2K

The End.