Search Results

Showing results 1 to 40 of 411
Search took 0.03 seconds.
Search: Posts Made By: Alex Edwards ; Forum: Java and child forums
Forum: Java Apr 29th, 2009
Replies: 10
Views: 862
Posted By Alex Edwards
If you post your files, people will be more willing to help because it gives them time to look at your logic and help you understand which steps to take to complete your project.
Forum: Java Apr 11th, 2009
Replies: 11
Views: 807
Posted By Alex Edwards
Since any Java-API based class is valid for the assignment....

I suggest inserting the values into a B-Tree (Binary Tree) then printing the objects in the tree via In-order traversal.


import...
Forum: Java Apr 11th, 2009
Replies: 11
Views: 807
Posted By Alex Edwards
More details are needed.

For example, what type of goal are you trying to achieve? Finding a low-running time way of printing your array or just getting the job done?


The Iterative/Recursive...
Forum: Java Nov 22nd, 2008
Replies: 7
Views: 918
Posted By Alex Edwards
Unfortunately, the implementation of ArrayList<T> looks [something] like this--


//... necessary imports

public class ArrayList<T> extends List<T> implements Collection<T>, Serializable{

...
Forum: Java Nov 22nd, 2008
Replies: 7
Views: 918
Posted By Alex Edwards
You'll probably have to reposition your read-stream cursor after each object read, otherwise you won't retrieve the right byte value from the file to match the data type(s) for the Object you are...
Forum: Java Nov 22nd, 2008
Replies: 7
Views: 658
Posted By Alex Edwards
I'm not sure how you plan to pause a method from executing instructions within it without somehow pausing (or 'blocking') at a particular line in the method.

If you don't want to use a while loop,...
Forum: Java Nov 20th, 2008
Replies: 11
Views: 1,221
Posted By Alex Edwards
If there is already a class available that can search through all of the files on your System, why not make a Decorator class or a class that Maps files (or file names) to a number, and if the file...
Forum: Java Nov 18th, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
Implemented Right-to-left evaluations for powers. Negatives were improved (slightly) by making negatives parse as multiplying -1 by the value.


import java.util.*;
import java.io.*;
import...
Forum: Java Nov 17th, 2008
Replies: 3
Views: 644
Posted By Alex Edwards
Ok, where is the confusion really? An API that specialized in SMTP and POP3 or the concept of SMTP and POP3 protocols?

-Alex
Forum: Java Nov 12th, 2008
Replies: 8
Views: 734
Posted By Alex Edwards
Chances are likely that your Instructor wishes for both your getArms and getLegs methods to return an array of Limbs--



Arm[] getArms(){


return arms;
}
Forum: Java Nov 12th, 2008
Replies: 28
Solved: Weird Question
Views: 1,710
Posted By Alex Edwards
If you work in an environment similar to mine, you'll have people telling you to "GIYF!" quite a bit XD.

If there is a term you don't understand, you should definitely study it. I find it much...
Forum: Java Nov 10th, 2008
Replies: 28
Solved: Weird Question
Views: 1,710
Posted By Alex Edwards
Reflection is a very specialized solution, much like the Java Native Interface, Remote-Method Invocation, Wildcards, Design Patterns, transient values, volatile values, concurrency, etc.

Don't...
Forum: Java Nov 10th, 2008
Replies: 7
Views: 543
Posted By Alex Edwards
Because some people receive inspiration to be a programmer by seeing all of the angles instead of just one.
Forum: Java Nov 9th, 2008
Replies: 4
Views: 402
Posted By Alex Edwards
Please use code-tags and proper indentation.

I believe you meant to close your while loop and your run method before overriding paint--


import java.awt.*;
import java.applet.*;

/* Part 0,...
Forum: Java Nov 9th, 2008
Replies: 6
Views: 1,787
Posted By Alex Edwards
Why not just create your own implementation of FTP by using Sockets and sending a collection of bytes from one application to another then have the receiving application write those bytes to a File...
Forum: Java Nov 9th, 2008
Replies: 7
Views: 543
Posted By Alex Edwards
You can probably get away with using one method, recursively until it resolves to an absolute base case.

I'm sure you can because I remember someone asking this same exact question, except they...
Forum: Java Nov 8th, 2008
Replies: 28
Solved: Weird Question
Views: 1,710
Posted By Alex Edwards
Use either TreeMap (http://java.sun.com/javase/6/docs/api/java/util/TreeMap.html) or HashMap (http://java.sun.com/javase/6/docs/api/java/util/HashMap.html)

Dictionary is also an okay way to go,...
Forum: Java Nov 6th, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
Ok, here's a fairly good version that evaluates floating-types well and also converts minus-negatives into positive values (90% accuracy).


import java.util.*;
import java.io.*;
import...
Forum: Java Nov 6th, 2008
Replies: 16
Views: 2,075
Posted By Alex Edwards
Hey, hey! I've already given you a +1 on rep!

Enough! >_<

=P
Forum: Java Nov 6th, 2008
Replies: 16
Views: 2,075
Posted By Alex Edwards
Yeah, but I forgot one thing.

IOException is a superclass of EOFException so its possible that the EOFException did occur.

EOFException...
Forum: Java Nov 6th, 2008
Replies: 16
Views: 2,075
Posted By Alex Edwards
Actually, if you read the documentation of DataInputStream's method readChar, you'll notice that it attempts to read not one, but 2 bytes--

Proof...
Forum: Java Nov 5th, 2008
Replies: 16
Views: 2,075
Posted By Alex Edwards
Have you tried providing a .txt extension in the String name of test?



// Open an input stream
stream = new FileInputStream ("test.txt");
Forum: Java Nov 4th, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
This program treats zeros properly--


import java.util.*;
import java.io.*;
/**
* Utility class for solving equations
*/
public class EquationSolver{
Forum: Java Nov 3rd, 2008
Replies: 1
Code Snippet: MineSweeper
Views: 5,311
Posted By Alex Edwards
Whoo O_O! Pretty fun XD

I can't seem to win! Right when I think I will, I end up landing on a mine XD

=)
Forum: Java Nov 3rd, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
5+3*8+-4
25
12/3*4+5
21

Enter an equation you would like to solve: ( 9 * (2 ^ (-3 + 5) * 8 - 3) )
-3+5
2^2*8+-3
9*29
261
Forum: Java Nov 3rd, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
A version that works with negatives--


import java.util.*;
import java.io.*;
/**
* Utility class for solving equations
*/
public class EquationSolver{
Forum: Java Nov 3rd, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
Darn I just noticed it doesn't handle negatives well... @_@

This can be easily modified by simply changing subtraction to plus-negative values and only doing sums of values.
Forum: Java Nov 3rd, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,182
Posted By Alex Edwards
Solves simple string-based expressions.

Currently only supports integers, but can easily be expanded to support float-types.
Forum: Java Nov 2nd, 2008
Replies: 4
Views: 615
Posted By Alex Edwards
http://java.sun.com/javase/6/docs/api/java/math/BigInteger.html


import java.math.BigInteger;

public class TestingBigInteger{


public static void main(String... args){
Forum: Java Nov 2nd, 2008
Replies: 19
Views: 1,251
Posted By Alex Edwards
I meant creating the GUI layout would be easy.

It will be hard to create plug-ins for the IDE, but depending on the scope of the assignment plugins can be an optional addition to the IDE.

If...
Forum: Java Nov 1st, 2008
Replies: 19
Views: 1,251
Posted By Alex Edwards
This should be an easy project, until you have to create a command for executing an applet instead of a standalone application.

Also executing packaged-classes might be a bit tricky.

It will...
Forum: Java Oct 31st, 2008
Replies: 36
Views: 27,204
Posted By Alex Edwards
In regards to the javadoc examples...

Did you remake some of the old API listings with new and improved ones that consist of examples of function usage? O_O

Even if it isn't you... it really...
Forum: Java Oct 23rd, 2008
Replies: 10
Views: 883
Posted By Alex Edwards
Yes, I am very sorry for mixing static fields and members. Fields execute once and only once when the first object of the type is created (otherwise if a program executed all static fields of all...
Forum: Java Oct 23rd, 2008
Replies: 10
Views: 883
Posted By Alex Edwards
static values are resolved at compile time, before objects are created.

A static member of a class is a shared location in memory between objects of that class.

Because static values are...
Forum: Java Oct 22nd, 2008
Replies: 5
Views: 1,101
Posted By Alex Edwards
An IDE is just an integrated development environment. Some IDE's come with a compiler, but they aren't really compilers. Eclipse simply uses a javac and JRE supplied by a JDK.

You can compile Java...
Forum: Java Oct 22nd, 2008
Replies: 12
Views: 1,688
Posted By Alex Edwards
It may be possible that Java won't support an image-type in future releases and therefore not provide Serialization support for it but that depends on what it is.

I remember getting warning...
Forum: Java Oct 21st, 2008
Replies: 5
Views: 1,101
Posted By Alex Edwards
Are you sure you mean compiler and not runtime, or potentially a JDK that supports a compliant version of both?

Are you seeking some "limitations" for your project? O_O

Your question grants a...
Forum: Java Oct 21st, 2008
Replies: 13
Views: 2,009
Posted By Alex Edwards
I think Object creation might shed some light on this issue...

If you create an Object of type A, A is at least of its class and additionally any other class it inherits from.

A cannot, at...
Forum: Java Oct 20th, 2008
Replies: 3
Views: 405
Posted By Alex Edwards
// ...

System.out.println(" Beverage Number of Votes Percentage");
System.out.println("-------------------------------------------------------------------------------------");...
Forum: Java Oct 20th, 2008
Replies: 8
Views: 526
Posted By Alex Edwards
Lighten up daddio! O_O

What Salem is saying is that you should literally show us your script! Show us what you've written so we can help you.

Geeze, it's not like we're going to steal your...
Showing results 1 to 40 of 411

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC