184 Posted Topics

Member Avatar for cleve23

The question you *should* be asking is that why does the dog-move() method gets called even when i'm calling the move on an animal object. Java rule : methods that can be called depend on the reference type and not the object type , so whats going on here ?

Member Avatar for JamesCherrill
0
208
Member Avatar for Pyler

if stack is empty , you should return some kind of error or throw some exceptions imo. revertStack.push(pop()); i dont know what those are , but assuming they do the work they are supposed to , AND its an **in-place** operation , you are returning a reversed version of stack …

Member Avatar for stultuske
0
274
Member Avatar for charlononnon

apart from the typo's in code , which you can correcteasily by pasting it into an IDE , look at your last for() loop for (i = 0; i < rowa; i++) { for (j = 0; j < colb; j++) { JOptionPane.showMessageDialog(null, " the resultant matrix is" + mul[i][j] …

Member Avatar for somjit{}
0
591
Member Avatar for Pyler
Member Avatar for stultuske
0
174
Member Avatar for dnanassy

That's a really big post ! anyway , a thing i'd like to ask for clariication : >a) Write code that transforms the string array provided above into a 2 dimensional character matrix, (e.g., char[][] charMatrix;). >b) Once in the two dimensional array form, use insertion sort to sort the …

Member Avatar for somjit{}
0
782
Member Avatar for frankenfrank

the OP asks something i have pondered over myself a number of times , but didnt ask anywhere feeling i might be tagged as vague and asking something without any objective. but regarding php , i would like to know how node.js stands against it. also, when it is said …

Member Avatar for vegaseat
0
423
Member Avatar for somjit{}

I like watching stuff like google tech-talks , josh bloch seminars/talks etc for Java. Can somebody provide something similar in nature for C# ?

Member Avatar for somjit{}
0
164
Member Avatar for MasterHacker110

This thread is a bit old , but i'm having the same questions (under different circumstances) as the OP. Googling for "CLR versions for Mac and Linux" led me to mono and wine ( can i say respectively here ? ). Now in one [stackoverflow thread](http://stackoverflow.com/questions/216841/how-does-mono-work) , i read that …

Member Avatar for sepp2k
0
258
Member Avatar for Fatima_110

google up "*sieve of eratosthenes*" . the algorithm results in a small but powerful code for finding primes.

Member Avatar for jwenting
0
301
Member Avatar for Stein102

[Algorithms (4th Edition)](http://www.amazon.com/Algorithms-4th-Edition-Robert-Sedgewick/dp/032157351X)

Member Avatar for prakash.seetharaman
0
113
Member Avatar for Seswing142

you can figure out the first word relatively easily using a "compare character read with ascii value of `space` " strategy. The last word would be a bit tricky. Keep a variable that points to the last position at which a delimiter was read , now while reading a character …

Member Avatar for stultuske
0
8K
Member Avatar for somjit{}

![b62b330b33236e12160db60d6c858d9d](/attachments/small/3/b62b330b33236e12160db60d6c858d9d.JPG "align-right") booted from a flash drive to go into the live cd mode , there , as soon as i double clicked a flash video , the screen went all jumbled up , and my pc hanged up. later i tried to check it in oracle virtual box , …

Member Avatar for farmwife
0
364
Member Avatar for somjit{}

I see fresh college grads all around running for a (/an almost) saturated software development field. Myself not being any exception to this either. But I'm kind of in a dilemma. 1. I have invested around 12 months learning stuff like Java, databases and other cs stuff. 2. but I …

Member Avatar for Coloradojaguar
2
242
Member Avatar for somjit{}

[Version 1](http://www.daniweb.com/software-development/java/threads/462737/generic-resizing-circular-array-.-do-i-need-to-implement-iterable-) had quite a few problems that i didnt think about. A lot of them were pointed out in the replies. I tried to correct them as best as i could to make this code. However , I'm having some doubts regarding what to do while implementing the Collection …

Member Avatar for somjit{}
0
296
Member Avatar for somjit{}

Since the underlying data-structure used here is an array , which is itself iterable via `for-each()` , i'm wondering how much benefit implementing `Iterable` will provide here. I would appreciate if someone could review my code and suggest any further improvements. **Code:** import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; class ResizingCircularArray<E> …

Member Avatar for somjit{}
0
1K
Member Avatar for ZombieKnight93

are you sure that the code you posted is exactly the one your working with ? If thats the case , then i see a lot of spelling mistakes in your code , Starting from the 1st line. Maybe taking care of them will bring you better luck. Your code …

Member Avatar for asaa
0
250
Member Avatar for somjit{}

i had previously worked with the GNS3 and cisco packet tracer console as a part of college lab work. It involved setting up and simulating LAN and VLAN topologies. Iv seen people in the CS dept , as part of their course , simulate various TCP/IP functions using C and …

Member Avatar for somjit{}
0
211
Member Avatar for ganges

**generally** , not much. but its good to have the option i suppose. Unless your doing something really big , or doing some testing , doesnt matter much. you may like reading [this](http://www.coderanch.com/t/568811/Performance/java/Array-ArrayList) .

Member Avatar for buddareddy.java
-1
271
Member Avatar for somjit{}

last night , the downvote counter was at 6. it hasnt been 8 hours , and my downvote counter rockets upto 27! all with just 2 members who have downvoted. one point though : when i click the "posts voted down" , shows only 3 posts. ps : i dont …

Member Avatar for deceptikon
0
306
Member Avatar for Skyline77

I feel sad that for a few dumbass people with no sense of what they are saying , students from india get such a bad rep. Unfortunately , the rotting education system in the country keeps feeding off peoples hopes that getting their child to an engineering institution would guarantee …

Member Avatar for somjit{}
-7
586
Member Avatar for Lmbcabhi

think about something : what is it that you read from a console ? ans : you read strings. what are strings ? they are (C-wise) an array of characters. Yes , this is a java forum , but there are consederable amount of hints "a string is basically a …

Member Avatar for somjit{}
1
6K
Member Avatar for somjit{}

Have been studying [Reservoir sampling](http://en.wikipedia.org/wiki/Reservoir_sampling) for a couple of days , What I'v tried here is to draw a uniformly random sample of size 3 from a bigger data (the English alphabet) via reservoir sampling. Below is what i'v come up with. if anyone could review my code and offer …

Member Avatar for somjit{}
0
157
Member Avatar for somjit{}

writting this : N = args[1].split("\\s+").length; with commandline argument like : `echo "A B C D E F G H I" | java Subset 3` , will this consume similar memory as would have been the case if i parsed the `"A B C D E F G H I"` …

Member Avatar for somjit{}
0
187
Member Avatar for ganges

are you trying to add/remove something to/from your arraylist while your program is running ? like read something from the console , parse it as a string and add it to your string type arraylist ? if so , then yes. that is quite a normal usage.

Member Avatar for somjit{}
0
120
Member Avatar for paramesh23

iv read very good things about Robert Sedgewick's algorithms in C [books](http://www.amazon.com/Algorithms-Parts-1-4-Fundamentals-Structures/dp/0201314525) . i personally have his java books , and i love them. if you are interested in algorithms , and wont mind a bit of java , theres a MOOC on algorithms starting at coursera from tommorow , …

Member Avatar for ankur.pandey.52687
0
314
Member Avatar for sub-zer0

divisibilty ? by what ? if your looking for odd/even number check you can use bit-wise operations : all even numbers will have 0 in their lowest order bit , whereas odd ones will have 1. check for that , and youll get your answers.

Member Avatar for sub-zer0
0
288
Member Avatar for somjit{}

i learnt that oneshould only keep source files in GitHub repos. so i deleted a previous repo , one with compiled class files , etc to create a new repo. i pushed all my Source files there. all OK. BUT , then i tried to add new source files , …

Member Avatar for mike_2000_17
0
238
Member Avatar for fmasroor

whats gpdraw? your post is quite laborious on the eye , maybe if you 1st describe how you are trying to solve it through your program , people here can help you out better.

Member Avatar for fmasroor
0
200
Member Avatar for PratikM

and while you do all this , dont touch the ide. make your memory and fingers work a little on that favourite text editor of yours.

Member Avatar for somjit{}
0
181
Member Avatar for somjit{}

probably doing something fundamentally wrong , but im used to the luxury of java's `System.currentTimeMillis()` or `System.nanoTime()` unfortunately. i have a code that i posted before for a different problem (couldnt compile properly in pelles C) , but now , although its compiling well and good , my clock outputs …

Member Avatar for Rahul47
0
224

The End.