5,727 Posted Topics

Member Avatar for kabiru.abdullahi.509

banks still try to run their own cables like that? Thought they'd stopped doing that over a decade ago and now use microwave or satellite links. Much cheaper to set up :)

Member Avatar for jwenting
0
148
Member Avatar for farwajafri90

The only ways would be to either make a class containing the index and value, as James suggests, to create a separate array containing the indices of the values in sorted order, or to create a new array of the values in sorted order. The very concept is weird btw, …

Member Avatar for jwenting
0
263
Member Avatar for jwenting

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.

Member Avatar for jwenting
0
248
Member Avatar for xrerd

switch (x.toUpperCase) { case "YES": ... break; case "NO": ... break; ... } much clearer overall than a jungle of nested if statements. Just about the only thing added to the Java language I like since generics.

Member Avatar for jwenting
0
2K
Member Avatar for yaya123

and don't forget that calling the method that increases or returns the counter introduces a call to the class :)

Member Avatar for dasi
0
264
Member Avatar for seankleyn

[QUOTE=PirateTUX;302688]Call me old-skool, but I'm going to say that C++ is the only only only way to go.[/QUOTE] Modern kids, thinking C++ is old-school... In my youth we thought C was too modern, it would never take off :mrgreen:

Member Avatar for keyboard_me
1
2K
Member Avatar for minitauros

Done that in the past, but last time was 10 years ago. Hotels+rental car is far more flexible than campervan, as you're far more mobile (especially in towns and cities where the large size of the campervan makes for problematic driving, and there tend to be fewer if any reasonably …

Member Avatar for Stuugie
0
652
Member Avatar for Szabi Zsoldos

snippets is fine, but entire solutions to common homework problems is not. For example the following is helpful to a lot of people in real situations, but useless to a schoolkid trying to get away with not doing his homework: String requestUri = request.getRequestURI(); StringBuffer requestURL = request.getRequestURL(); requestURL.delete(requestURL.length()-requestUri.length(), requestURL.length()+1); …

Member Avatar for Szabi Zsoldos
-1
528
Member Avatar for ParPau

And for formating the output of the enum (rather than just returning a String containing the exact value like MARS in this code). Mind this might under some conditions cause side effects, if there's something that relies on Foo.F being "F" exactly. public enum Foo { F("f1"), G("f2"), H("f3"); private …

Member Avatar for jwenting
0
271
Member Avatar for mustafaaltup

and what's stopping you from finding that code? It's not as if there's not a gazillion examples of just that out on the web, in tutorials, books, your course notes, etc. etc. etc.

Member Avatar for jwenting
-1
187
Member Avatar for V3N0M

You should ask your teacher, not us, what the scope and requirements of his course work are.

Member Avatar for ishaan3731
0
317
Member Avatar for Junior.frogie
Member Avatar for kristy48

what do you have thus far? Best thing you can do is talk to your users, ask them what they do right now and how they expect the new application to do it for them.

Member Avatar for Momerath
-5
322
Member Avatar for coBra

if you're too stupid to find the button to post a new thread, you're far too stupid to create anything like a chatbot.

Member Avatar for Momerath
0
659
Member Avatar for wasme

and oh, youtube videos are notoriously bad as a teaching tool. While they can help, in combination with written material, to make concepts clearer, they're not to be used as your sole source of information, especially (because the average quality is very poor) if you don't have prior knowledge and …

Member Avatar for wasme
0
197
Member Avatar for nikolaos

not compiler version, file format version. Java 6 has compiler version 1.6.x, file format version 50. Java 7 has compiler version 1.7.x, file format version 51. Java 8 has compiler version 1.8.x, file format version 52 (I think, don't have that one installed to check). A Java 6 compiled class …

Member Avatar for nikolaos
0
384
Member Avatar for agrbinoo.albaker
Member Avatar for jwenting
0
181
Member Avatar for warlord902

as you're having a requirement for scalability, php becomes a poor choice (it's generally less (easily) scalable and maintainable than other technologies). Of course it all depends on how scalable it needs to be, both JEE and ASPx are designed for scaling into the near unlimited requests per second :) …

Member Avatar for brodiebyatt
0
1K
Member Avatar for stupidenator
Member Avatar for anish.prasad.7739
Member Avatar for yasheela

yes, seems like the print statement is placed outside the method, which is illegal and generates a compiler error.

Member Avatar for hannahaddad
0
140
Member Avatar for ameer.mhmed

hmm, I'd make some small changes to the User class as well. Declare the data fields to be final, and declare the constructor arguments to be final as well. If it were a realistic User you'd also not have a getPassword() method but a validatePassword(final Object candidate) method that simply …

Member Avatar for ViolaPAllen86
0
404
Member Avatar for DeanMSands3

well, it is a valid email address, just not an existing one. That validator probably knew about a lot more address forms than just the (now) normal name@domain.tld form. E.g. Lotus Notes, Novell Netware, and many other network systems all had/have their own addressing systems and while now seeming archaic …

Member Avatar for pritaeas
0
318
Member Avatar for asif49

you can access jars on remote systems IF you can add the location of the jars to the application classpath. Now to find a JVM that allows for classloading using UNC paths (Windows drive shares with an assigned letter would work fine, they're seen as local drives to software running …

Member Avatar for jwenting
0
125
Member Avatar for Sifiso21031085

they'd better not try, or they'll have a fight on their hands. I'm not giving the place up that easily :)

Member Avatar for Dani
0
259
Member Avatar for lfcoats

public class Grading { public static void main(String... args) { System.out.println("you fail!"); } } That's pretty much the standard grade for the typical homework question... In your case, right off the bat you fail to set "bigTemp" to the right number. Stopped looking there.

Member Avatar for lfcoats
0
1K
Member Avatar for ziadkassam
Member Avatar for napninjanx

and oh, make sure to do all that while you're not connected to any network, including the internet. Physically unplug network cables and turn off WiFi hotspots.

Member Avatar for Tcll
0
280
Member Avatar for oberle1515

It is. In fact it's stereotypical and handing them any code at all is doing a great disservice to the entire profession. For anyone who does a few minutes of experimenting and reading these should be no problem at all to solve.

Member Avatar for pritaeas
-1
479
Member Avatar for shubham.goel.41995
Member Avatar for rose88

A company were to set that requirement for "security" I'd hand back the assignment and tell them I won't be responsible for the inevitable breach of security.

Member Avatar for jwenting
0
234
Member Avatar for ckide

> database program for a school small and big, which i use c++ or java? what your teacher tells you to use.

Member Avatar for invadev
0
310
Member Avatar for ayushi_1

I think you missed the intent of your teacher which is for you yourself to come up with an idea rather than to just browse the internet and ask others to think for you.

Member Avatar for danie93
0
146
Member Avatar for diafol

There's ample evidence that "gender specific toys" are far from evil, they're natural. As late as last year there was for example a study where newborns and toddlers were placed in a room and allowed to choose their own toys. Girls ended up choosing dolls, boys ended up choosing traditional …

Member Avatar for iamthwee
0
467
Member Avatar for Varunkrishna

and the library has major flaws in that it's very hard to use, and has no way to rapidly (if at all) convert to and from the old Date logic. It's simply Joda time bolted on to the core libraries, and just changing the package names and license statements in …

Member Avatar for jwenting
0
379
Member Avatar for paeez

seeing as the solution to the problem is contained in the official Sun tutorial, I wonder what the problem is :)

Member Avatar for S1nfulAngel
0
1K
Member Avatar for xfinity.Ace
Member Avatar for SK33

however, 1.441 will AFAIK box to a Float, not a Double. 150 might box to a Byte. This is of course a specific problem here because of the use of hardcoded magic numbers rather than fields, and not having those magic numbers forced to a specific type. Forcing double through …

Member Avatar for raj.mscking
0
188
Member Avatar for kelvinnvl

Nothing wrong with Microsoft products, but don't stare blindly at any one product when building experience. If you want to switch jobs, and there's an offer open using something else that you wouldn't mind learning, jump on it and broaden your horizons. And there's always work for people who know …

Member Avatar for jwenting
0
438
Member Avatar for Sifiso21031085

coders aren't the ones inventing business plans. There's a lot of ideas out there, problem is getting funding. You might have noticed the world's in a bit of an economic slump, which isn't helping to get investment capital for radical new business ideas.

Member Avatar for Agilemind
0
220
Member Avatar for Dean_Grobler
Member Avatar for ganges
Member Avatar for Curious Gorge

Visual Studio has a lot of very useful features, but most only become useful in fairly large products with multiple developers working on it as a team, and of course a lot of things only come into play for specific types of applications like web applications.

Member Avatar for Curious Gorge
0
286
Member Avatar for RikTelner

Today's prices for one representative type of modern RAM in a normal price store (so no stunt prices): 4GB 41 Euro 8GB 78 Euro 12GB 135 Euro 16GB 179 Euro 32GB 344 Euro 64GB 662 Euro As you see, it roughly doubles as the size doubles. This type doesn't come …

Member Avatar for RikTelner
0
243
Member Avatar for rabadiyaronak

making any assumption about equality between floating point numbers is a mistake. http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html read this for the nitty gritty details. To summarise: it's impossible to map a floating point number with exact precision, therefore all you'll ever get is an approximation. How good an approximation depends on hardware, operating system, …

Member Avatar for jwenting
0
297
Member Avatar for Alex_20

There is no "best". Therefore asking for "the best" is a by definition useless exercise. There might be something that's more appropriate for specific purposes in specific scenarios than something else, but you never tell us what your specific scenario is so again it's impossible to answer your question. Ruby …

Member Avatar for jwenting
0
492
Member Avatar for Xabush

hmm, a Smart is a Mercedes, technically (they own the brand...), not a BMW. Now a Mini, that is a BMW :) OP, there are a ton of introductory tutorials available on Java, I strongly suggest you work your way through at least the one's on Oracle's own site at …

Member Avatar for C-Money
0
234
Member Avatar for ZaneDarklace

yes, you can do that but it takes up a lot of extra memory and CPU cycles as supposed to simply looping through the already existed and sorted array in reverse order.

Member Avatar for C-Money
0
238
Member Avatar for Varunkrishna

And even if you make something that contains no flaws of its own, it's going to be compiled by a compiler that might have flaws, run on a runtime that has flaws, which exists on an operating system with flaws that runs on hardware with flaws and is used by …

Member Avatar for stultuske
0
239
Member Avatar for Aya Safi

The End.