General Java questions

1) A program written in Java is supposed to be multi-platform. However, I notice alot of programs I've seen written in Java are distributed to specific systems using different file extensions. The Windows version usually uses the .exe extension and I'm wondering how come they don't use the default .class extension? One major company is Borland for their JBuilder. They had a Windows version long before a Linux version even though I hear it was created in Java.
2) Is there a free install program for Java or are the only ones commercial products?
3) Is there a personal database available for Java that will work on all platforms? In my Internet Programming with Java class we used mySQL but I don't want to use a server database let alone one that will require a seperate install.
4) Is there a free multi-platform IDE for Java (not counting just a text editor)?
5) Can you universally access a system with Java? Ex. If I wanted to load an application with Java in Linux and Windows do I need to write two seperate routines on how to do this or does Java have a built in function? If I wanted to delete a file is this written universally the same?

1) A program written in Java is supposed to be
multi-platform. However, I notice alot of programs
I've seen written in Java are distributed to specific
systems using different file extensions. The Windows
version usually uses the .exe extension and I'm
wondering how come they don't use the default .class
extension? One major company is Borland for their
JBuilder. They had a Windows version long before a
Linux version even though I hear it was created in
Java.Java programs are packaged (wrapped) to allow invocation using a .exe extension. It is not mandatory, nor is it a function provided within the native Java libraries. Standard Java is packaged in .jar files that allow execution within a Windows (or other) environment. Environmental setup is necessary to allow the O/S to find the Java libraries. This is a simple process that includes additions to the PATH and CLASSPATH environment variables.
2) Is there a free install program for Java or are the
only ones commercial products? I believe installAnywhere has a stripped down version of an installer that you can use for free. They also have a pay-per version that provides more extensive functionality.
3) Is there a personal database available for Java
that will work on all platforms? In my Internet
Programming with Java class we used mySQL but I don't
want to use a server database let alone one that will
require a seperate install.There are several Java embeddable SQL compliant databases including Cloudscape and Pointbase. These are written and deployed as Java libraries, and can run within the same JVM as your application or in a seperate JVM on the same machine, or on a seperate machine with IP connectivity. I'm sure there are more, these are just two that I have used. I don't know that there are any free implementations of embeddable databases for Java (but just wait awhile, things change all the time).
4) Is there a free multi-platform IDE for Java (not
counting just a text editor)?For personal use, there is Borland JBuilder personal that can be downloaded and used for free. I personally use Sun ONE Studio CE (formerly Forte for Java) which is also free but uses a lot of resources, so be sure you have an adeqaute workstation to run it on. Again, I'm sure there are others, these are just the ones I have had success with.
5) Can you universally access a system with Java? Ex.
If I wanted to load an application with Java in Linux
and Windows do I need to write two seperate routines
on how to do this or does Java have a built in
function? If I wanted to delete a file is this
written universally the same?I'm a little unclear on your question, but you can invoke a seperate process (application) from Java using the O/S native interface through a Java function call. A seperate method is probably not necessary for each O/S, just different parameters passed to the exec function.
File I/O and file manipulation can be done using Java, and does not have to be O/S specific (but you have that option if you want to).

Similar Messages

  • 4 basic java questions..

    ok so I already learned Java last year (in grade 11), but my teacher didn't really teach anything, we learnt everything by ourselves from the API... so theres a lot of things I actually don't understand, but for now I want to ask 4 basic questions:
    1. What does static mean?
    2. Why would u "final" a constant variable? ie. If you have a variable called SIZE which is set to 5, so if u want it to be a constant, just never change its value. But what does the keyword final do to it?
    3. What's super? I see it sometimes, and my teacher showed us in the applet exampls to use super.paint(g) or somethign like that for the paint method, but I never use that because I noticed it works fine without it..
    4. Whats a question mark? I saw a game that was made in java and it had a lot of places where it had a question mark , which was part of the syntax. For example,
    int j1 = i != 0 ? i - 1 : 199;
    OR
    JUMPVEL = (fSuperSlime) ? 65 : 31;
    I really don't understand these lines...
    feel free to answer any of these questions...

    wow cool...thanks.. that question mark thing is nice
    saves a few lines..
    now, about super, so u mean u can access the parent
    class's variables?Variables, methods, constructors, if the access level is such that it's allowed.
    This will be covered in any tutorial or text though.
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.
    James Gosling's The Java Programming Language. Gosling is
    the creator of Java. It doesn't get much more authoratative than this.

  • Urlencoder : java question...

    Hi,
    I have a question on url encoding...
    I have to open a file from the remote location and
    I have file with the name something like this...: "{0EC79CFA-9AD5-4120-A768-BD3FBFA9BF6A}_2003_0816Image0006.JPG"
    I want to open this file after encoding the file name using urlencoder.
    Please suggest me how to do this. Please give me a sample code to for this...

    You are being way too vague. I cannot tell if the file is to be opened in a browser or on a server. And you still have not explained what this has to do with JSF. It is is not a JSF-specific question, take it to the general Java forum. [But not before reading this over|http://www.catb.org/~esr/faqs/smart-questions.html] .

  • What kind of Java questions can I ask?

    Here's a change:
    I want to interview some good java people. I have lots of Java questions in mind which I could ask them, however fellow JavaGuru's
    I would like some potential questions from you which I could ask someone who claims he/she is a good java programmer??
    I am asking because I want to be as fair as possible to the applicant and not ask them questions which I think are tough etc...

    Touchy subject.
    The language is not as important, as understanding programming concepts.
    So fine, when the programmer's horizont involves some abstraction levels.
    If a programmer can write an UML class diagram for a linked list.
    If a programmer knows a design pattern Singleton.
    If a programmer can write his/her own single linked list class with sorted insertion.
    Language concepts:
    - Why:
    import java.util.*;
    Map map = new HashMap();
    - Answer:
    Hiding the choice of implementation (HashMap) by using the more general
    interface Map.
    Don't expect much on an interview though. The situation might not be
    adequate to distinghuish between the good and the bad apples.
    Talking code is a good starting point, code of your making unfortunately.
    A good programmer will hesitate to show really useful code.
    A bad programmer might have stolen his/her code.
    The problem you might have, that you are in search of an expert, not
    having the expertise in-house. In that case you might get a better
    picture, talking about which IDE would be opportune, whether he/she
    has experience with the source version system CVS, what would his/her
    ideas be about coming projects.
    That would establish a common line of communication.

  • Help.....Java Question

    I am new at learning Java, I need some help. My question is I have 2 numbers either can be zero or both, the quotient will be reported as zero and no division should actually be done. Otherwise, the quotient should be computed so the it is >=1 (divide the larger number by the smaller). How can I do this?

    You can find some pointers to general Java help at http://forum.java.sun.com/thread.jsp?forum=54&thread=151766
    Is this what you're looking for?
        public double func(double a, double b) {
            if (a == 0.0 || b == 0.0)
                return 0.0;
            if (a > b)
                return Math.abs(a / b);
            else
                return Math.abs(b / a);
        }

  • Interesting Java Questions. Need answers Pls

    Hi All,
    I have come accross few java question, could any one please provide best answers please?
    1. Why the wait() method is there in the Object class? Not in the Threads?
    2. Why JDBC has all interfaces & not classes?
    3. Which type of collection do u prefer to make the incoming objects in sort order?
    4. Why the hasCode() method should be implemented if we are overiding the equals(0 method?
    Please provide me best answers ASAP.
    Girish.K

    do u prefer tohttp://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal - in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Java Question... please help

    I am running  Snow Leopard  (mac os x version 10.6.8)
    For the past couple of years I've played gin in yahoo games.  
    Yesterday when I entered the gin lobby ...the font was so tiny
    I wasn't able to read it.   I checked Java on my computer and
    it is enabled, however I just realized when I go into the gin
    lobby... there is no java icon on the dock.   Since the font size
    is fine in all other applications, I am presuming this is a Java
    issue.  
    Help if you are able.. please and thanks

    Huh? Is this a Java question? Where's the Java? I just see a little JavaScript. Do you know how to use servlets and JSPs?
    Jesper

  • General dreamwevaer question

    hello dreamweavers.
    im a newbie going to use dreamweaver from next week and beyond,so id like to ask the following:
    should i design the website in photoshop and then import it into dreamwevaer,in order to code it?
    is dreamwevaer flexible in design point of view,or is it mostly getting finished designs such as headers,footers,flash banners,
    and then building up the site where things so and such.
    thank you.

    Hello Nancy.
    seems like an informative website,i can see it is easy to understand the
    basics.
    Στις 23 Μαρτίου 2012 4:29 π.μ., ο χρήστης Nancy O. <[email protected]>έγραψε:
       Re: general dreamwevaer question  created by Nancy O.<http://forums.adobe.com/people/Nancy+O.>in
    Dreamweaver - View the full discussion<http://forums.adobe.com/message/4283588#4283588

  • Use of RCP/OSGi or "General Java"

    I like to develop further software which is written in RCP, but yet I don't know anything about RCP. I roughly understand the existing code structure and probably could separate the engine code from the RCP wrapper code. So I am wondering if it's worth to learn RCP and develop it in RCP or if I should separate the engine code and write new code for the user interface in "general Java" with Buttons, ActionListeners and so on.
    What would you recommend if you have learnt RCP? Is it difficult and take long time to learn it? How did you learn it? Do you know a book or tutorial you could learn it in an easy way?

    Please google. There is lots of information.
    I advise to take an RCP course. It will learn you everything in 5 days for
    around 1500 to 2000 dollars.
    > I like to develop further software which is written in RCP, but yet I don't
    know anything about RCP. I roughly understand the existing code structure and
    probably could separate the engine code from the RCP wrapper code. So I am
    wondering if it's worth to learn RCP and develop it in RCP or if I should
    separate the engine code and write new code for the user interface in
    "general Java" with Buttons, ActionListeners and so on.
    >
    > What would you recommend if you have learnt RCP? Is it difficult and take
    long time to learn it? How did you learn it? Do you know a book or tutorial
    you could learn it in an easy way?

  • General java sound capability questions

    im trying to get a handle on the basics of what i can do with sound in java. ive read a lot of pages but there are still some ambiguities.
    what i want to do ideally is have an applet that takes sound from the client microphone and records the sound file on a server. so:
    if this were an applet, would it require me to first save the sound file locally (and therefore sign the applet?) or can the sound be saved in memory somehow without creating a "file" per se - then moved to the server? if it could be done does it require JMF?
    i read that an applet cannot convert the file format client-side. does that mean the file would have to be uploaded in an uncompressed format?
    a java webstart app is also acceptable for my purposes. can someone advise if that is the best way to go?
    can a web start app do the following:
    - connect to a database (on the server)?
    - record / compress / upload a sound?
    if so, i guess java web start is the way to go... if you know any good resources for any of these issues please let me know... thanks!

    BamaColtsFan wrote:
    Hey Gang,
    I know that the general rule here is to try your code first then ask why it doesn't work but my questions right now are more conceptual than anything else. I know a little (very little, really) about Java and some of it's capabilities. I've been thinking about possibly converting a MS Access Utility that I use into a Java program. The MS Access version can be a little unstable and I think by moving to Java, I can eliminate that problem. But, I want to be sure that Java can do everything I need it to do before I spend a lot of time only to find I can't get there from here. These are my initial questions:
    1. I have to run several reports from a large Oracle system. Currently, I export the data as Excel files and link the Access database to them. Using Java, will I be able to export as text files (daily) and have the program read the text and treat it like a database file? The short answer is NO. The more lengthy answer is yes, but you can attach to Excel spreadsheets through ODBC (JDBC/ODBC Bridge) and use them as a database the same way Access did.
    2. Part of the output of the Access database feeds MS Word mail-merge documents that are used to send e-mail messages. Will Java format and send e-mail via Outlook? NO, but you can send mail with the Java Mail API.
    3. The second half of the output is an Excel Workbook with re-formatted and cleaned report data from the original files. Can Java dynamically pass information to Excel and create the various worksheets necessary to display the data the way management wants to see it? NO
    Now having said all of that, there is the Java interface through OpenOffice, which will support MS-Office documents. The MS Office products are Windoz specific, and as such, there are some 3rd party Classes out there that will interface to them, but not directly from Sun's standard API.

  • A few general java.nio.* questions

    Hi,
    I've been reading up on selectors and channels for networking programming. During my reading I came across this website, http://www.javaworld.com/javaworld/jw-09-2001/jw-0907-merlin.html
    It's kind of dated (3 years ago) but the example they provide on non-blocking I/O still compiles.
    Further in the article (http://www.javaworld.com/javaworld/jw-09-2001/jw-0907-merlin-p4.html) they mention a few "gotcha's" with using selectors. One in particular that caught my attention was "a selector can have only 63 channels registered, which is probably not a big deal."
    So only 63 channels max can be registered to a selector ? I searched around the web and the java API looking to confirm this. Does anyone know this to be true or if the max 63 registered channels was dropped before java 1.4 beta became the stable release of java 1.4? The article was written when java 1.4 was in beta.
    Lastly, do selectors weed out dropped socket connections? For example. Say I have 500 socket (TCP/IP) connections to a server of mine. Of those 500 , 100 are now closed by the client by the time the server comes around to send them data. As the server loops through the 500 connections using a selector, will there be a delay because 100 connections are dropped and the server must wait for a timeout before proceeding to send the data to the next connection or does the selector detect these 100 dropped connections and only use the 400 still connected?
    I hope this last question makes sense.
    Thanks in advance,
    Nick

    Hi,
    I've been reading up on selectors and channels for
    networking programming. During my reading I came
    across this website,
    http://www.javaworld.com/javaworld/jw-09-2001/jw-0907-m
    rlin.html
    It's kind of dated (3 years ago) but the example they
    provide on non-blocking I/O still compiles.
    Further in the article
    (http://www.javaworld.com/javaworld/jw-09-2001/jw-0907-
    erlin-p4.html) they mention a few "gotcha's" with
    using selectors. One in particular that caught my
    attention was "a selector can have only 63 channels
    registered, which is probably not a big deal."
    So only 63 channels max can be registered to a
    selector ? I searched around the web and the java API
    looking to confirm this. Does anyone know this to be
    true or if the max 63 registered channels was dropped
    before java 1.4 beta became the stable release of java
    1.4? The article was written when java 1.4 was in
    beta.I don't know if that limit of 63 is still there, but it probably makes sense to use a pool of threads each supporting a Selector if the number of connections gets that high.
    Lastly, do selectors weed out dropped socket
    connections? For example. Say I have 500 socket
    (TCP/IP) connections to a server of mine. Of those 500
    , 100 are now closed by the client by the time the
    server comes around to send them data. As the server
    loops through the 500 connections using a selector,
    will there be a delay because 100 connections are
    dropped and the server must wait for a timeout before
    proceeding to send the data to the next connection or
    does the selector detect these 100 dropped connections
    and only use the 400 still connected?closed channels are removed by the select statement. When using non-blocking IO, nothing waits anyway.
    I hope this last question makes sense.
    Thanks in advance,
    Nick

  • General java programming question.

    i have trouble knowing when something is referred to in contrast to something being copied.
    in this case, the array has changed, but not the character.
    public class ReturnArray2
         public static int[] getArray()
              int a[] = new int[3];
              a[0] = 2;
              a[1] = 4;
              a[2] = 6;
              return a;
         public static void mystery(int[] b, char r)
              r = 'Q';
              for(int i = 0; i < b.length; i++)
                   b[i] = b[i] + 5;
              System.out.println("array b contains: ");
                   for(int i = 0; i < 3; i++)
                        System.out.println(b[i] + " ");
         public static void main(String args[])
              int scores[];
              char x = 'L';
              scores = getArray();
              System.out.println("Array in main.");
              for (int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
              mystery(scores, x);
              System.out.println("After return from mystery.");
              System.out.println("character is " + x);
              for(int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
    Array in main.
    2
    4
    6
    array b contains:
    7
    9
    11
    After return from mystery.
    character is L
    7
    9
    11
    */and in this case, why didn't the array change?
    public class ReturnArray2
         public static int[] getArray()
              int a[] = new int[3];
              a[0] = 2;
              a[1] = 4;
              a[2] = 6;
              System.out.println("array in function");
              for(int i = 0; i < 3; i++)
                   System.out.println(a[i] + " ");
              return a;
         public static void mystery(int[] b)
              for(int i = 0; i < b.length; i++)
                   b[i] = b[i] * 2 + 5;
              int[] c = new int [3];
              c[0] = 55;
              c[1] = 44;
              c[2] = 33;
              System.out.println("array c contains: ");
              for (int i = 0; i < 3; i++)
                   System.out.println(c[i] + " ");
              b = c;
              System.out.println("array b contains: ");
                   for(int i = 0; i < 3; i++)
                        System.out.println(b[i] + " ");
         public static void main(String args[])
              int scores[];
              scores = getArray();
              System.out.println("Array in main.");
              for (int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
              mystery(scores);
              System.out.println("After return from mystery.");
              for(int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
    array in function
    2
    4
    6
    Array in main.
    2
    4
    6
    array c contains:
    55
    44
    33
    array b contains:
    55
    44
    33
    After return from mystery.
    9
    13
    17
    */

    i have trouble knowing when something is referred to
    in contrast to something being copied.Java has only one passing mode: pass-by-value. The value, whether it be of an int or a reference, is always copied.
    in this case, the array has changed, but not the
    character.A reference has a value, that value is either null or the address of an Object. The value of scores is the address of the array returned by getArray(). When you pass scores to mystery() the value of scores is copied to a new reference called b on the local stack frame. The value of b is the same as the value of scores, but they are two different references. However, since the value is the same they both contain the same address which is the address of the array. When you modify the array you are modifying the array at the address that b has as it's value. Since scores has that same address as it's value, in other words they both point to the same array, you will see it modified in both places. When you passed the char the value (L) was copied to the local stack frame. Your copy r now has the value L. Modifying r modifies the value at r, which is independent of the value at x.
    So, with the char you changed the value at the address. With the reference you changed the value at the address the reference contained as it's value.
    and in this case, why didn't the array change?You didn't modify the array, you simply printed it's contents concatenated with an empty String.

  • Writing games for US wireless carriers - general newbie question

    I am a newbie to kvm and j2me so excuse me if these question are very basic or if i'm asking the wrong questions.
    I have been asked to quickly research writing games in java for US wireless carriers. Ideally I'd like to pick a carrier (e.g. Verizonwireless) and find out more about writing for them. How should I go about researching this?
    My research so far has found:
    General j2me info:
    I did some initial searching in the forum and found that the following link will give me a basic guide to j2me:
    http://access1.sun.com/SRDs/access1_srds.html.
    If I look at the documentation for -
    - Java 2 Micro Edition (J2ME)
    - Mobile Information Device Profile 1.0.1 (MIDP)
    Is this still the best place to look at online?
    Specific wireless carrier info:
    I had no luck finding where I should look for information on specific
    wireless carriers. Any suggestions? Also am I approaching this the right way or should I be looking at the specific java enabled mobile phones rather than the wireless carrier? Or is it a combination of the two?
    Thanks for any help.

    If the games are going to be networked then you should find out what type of network the carrier has (TDMA,CDMA,GSM with or without GPRS, etc. what bandwidths.... WAP or I-Mode). Regardless, you should be also concerned with what are the phones available on the carrier and what is their Java support.
    shmoove

  • Hardcore Java Questions Thread

    Greetings,
    I am otherwise known as Robert Simmons jr. O'Reilly has recently published my first book entitled hardcore java. Since the motivation for some of the content came from questions asked on this forum, I decided to make a question an answer thread on this forum to deal with your questions on the book, its content and topics.
    You can find the book at O'Reilly:
    http://www.oreilly.com/catalog/hardcorejv/
    Or Amazon.com
    http://www.amazon.com/exec/obidos/tg/detail/-/0596005687/qid=1080130526/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/103-4213374-6043826?v=glance&s=books&n=507846
    It is also on sale in quite a few other places but I just mentioed two of the most popular.
    Feel free to ask your questions and I will knock them down as quick as I can.
    -- Robert Simmons Jr.

    I read the sample chapter about using final and,
    whilst I agree with you about using final beinggood
    coding practise, there are a few points I wouldmake:
    Example 2-2. Simple constants using final:
    public static class CircleToolsBetter {
    /** A value for PI. **/
    public final static double PI = 3.141;I think you should limit the scope of that variableby
    making it private.Why? What would be your motivation in hiding this
    value? At any rate, the example you are mentioning
    wasnt designed to demonstrate guarding access to
    constants. I talk about that a bit later in the
    chapter. There may be reasons for havign this private,
    I concede that. Just in this example I cant think of
    one. At any rate derived classes will probably need PI
    so protected would be a better option if you want to
    seal it off for some reason. I just think that you should always try to limit the scope of a variable as much as possible. I know that wasn't the point of that particular example, but I think it's good practise "in general".
    At any rate derived classes will probably need PI so
    protected would be a better option if you want to seal
    it off for some reason.Ah, but what about classes (it's public in the example), they could reference that variable and then if it changes ...
    In the section "Public Primitives and
    Substitution" you don't mention anywhere thatyou
    can get around the problem of having to recompile
    dependant classes by using static initializion and
    also by interning Strings. I think that would makea
    good addition to that section.Good feedback, Ill think about that for revision 2.
    There is some other material that didnt make that
    chapter as well. =) However, I do talk abotu
    initialization in detail in chapter one. You should
    check it out. =) Do I have to buy the book : )
    You say[i] "Most singleton classes shouldn't be
    declared as final. You never know what otherfeatures
    your class's user will dream up. However, since
    singleton classes need to be protected fromexternal
    instantiation, you can't make the constructorpublic.
    The solution to the problem is a protected
    constructor". I think you should add that thismeans you must put your singleton in a relevant
    package (i.e. Not in a package with classes that
    shouldn't be able to instantiate the singleton!)Of course you should always employ good package
    management. In fact package management might be in
    second edition as I do have quite a few notes on it.
    However, a singleton can only instantiate itself and
    that only once, so I dotn see why you think this is a
    concern. The goal of protected constructors is to
    prevent external instantiation of the class. Perhaps
    you were thinking of constructors with "package
    private" access (ie no public, private or protected
    keyword used) ?? Protected constructors can only be
    accessed bby the class and subclasses, whereas a
    "package private" constructor can be accessed by any
    class in the package.
    A protected constructor is accessible to the class itself, its subclasses, and classes in the same package.

  • General Graph Question

    Hello all,
    I am interested in learning about graphs and shortest paths in Java, particularly for problems like the Word Ladder from SIGCSE 2001. I have read up about graphs in a couple Algorithm / Java books, but they mostly describe the structures and behaviors of graphs and algorithms to traverse graphs (BFS, DFS, etc), but I'm having a difficult time understanding how to "construct" a graph.
    For example, if one was interested in finding the shortest path between two five letter words in a graph (start vertex, end vertex), you could read in all five letter words that are to be tested into an unordered Array. After the words are all stored in the unordered array, you could BFS the unordered array which would take the starting vertex (a word from the unordered array), add it to a queue, mark that vertex as visited, remove it from the queue, and then find the next word that only has a one letter difference than the last, add that to the queue, mark it as visited, search for the next word that's only one letter away from the second in the unordered array, etc?
    money <----- Starting vertex
    honey
    etc
    etc
    etc
    (ending vertex)
    I don't know if I did a good job of explaining what I'm asking... Generally what it boils down to is that I'm having a difficult time understanding the actual concept of graphs and how they are constructed, assuming you have a bunch of five letter words (Word Ladder) and you need to find the shortest path between first word and the last word you supply.
    I've tried searching around the net for a good example of graphs actually being constructed and searched through in Java, but something isn't clicking with me. Is there anybody that could assist in helping me understand this concept?
    Any help would be appreciated, and I apologize in advance if I'm not supposed to post general questions in this forum.

    Building the graph is the lesser of the tedious jobs you have to do: every word represents a node. An edge from node A to node B occurs if word A differs in only one letter with word B. If you represent the graph as nodes having an outgoing edge list then B contains A in its list only if A contains B in its list, i.e. the graph isn't directed. e.g. "honey" is one 'hop' away from "money" because "money" is one 'hop' away from "honey"; the 'hop' is the edge. Once you have that complete graph you can play with shortest path algorithms etc.
    kind regards,
    Jos
    ps. personally I'd build a BitSet per node indicating which other node(s) are one hop away from that node. The words can be simply stored in a linear array.

Maybe you are looking for

  • Sort field in maintenace plan

    hi does some one implementd sort field use in img of maint plan and does dead line monitoring in ip3o whar are the benifits or scope

  • IPad mini retina heating problem

    My iPad gets really hot, if I play games and adjust brightness to full. Does anyone else have this problem?

  • Firefox shows a white page with "connecting" noted up top?

    when launching firefox on my pc, the menu bar, etc. will appear, however the screen remains white, while a tab showing "connecting" continues to oscilate. I have tried to "reset firefox" under Troubleshooting mode and have tried launching is safe mod

  • Why does system go comatose?

    My system (OSX 10.6.7) three times went into a comatose state.  The only thing working was the mouse moving the cursor.  After the first two times, the system restored itself, only to become comatose after five minutes. After the third time, I manual

  • Contacts missing from Desktop

    Outlook crashed. Uninstalled and re-installed. All working, except the Contacts folder on Desktop is empty. Contacts on E2 are fine and HotSync Log show that Contacts have HotSync'd. Where has it gone? Could it be an Outlook issue? Any assistance gre