well im thinking of making a program that can impress my instructors,,
can you suggest what program should i make??
and please assist me..

8 Years
Discussion Span
Last Post by verruckt24

Haha. No details? If you want to impress someone you'll have to program something that is either extremely cool (which would involve coming up with your own idea) or program something that is above your skill level. I'd program something that isn't that difficult such as the client/server game that was recently posted here, but that is probably above your current skill level by a little bit. In addition, such a game demonstrates at least basic knowledge of important concepts. i.e. the idea is to implement some simple game using sockets. Obviously it'd be an interactive game where client and server are involved in some type of communication. For example, the client drags their mouse around on their JFrame window, and have the server draw circles (or some other shape) at whatever position the server is currently dragging.

Edited by BestJewSinceJC: n/a


Code a ILoveYou class , which will display love symbol is various color combination .

System.out.println("love symbol is various color combination .");



Hey dude..
I'm ravi finished my b.tech this year and i'm from india hyderbad. I'm sending you a program which can impress your instructor. show this to him. And if you have any doubts call me on my mobile 09885565635

Arrays are first-class objects

Regardless of what type of array you’re working with, the array identifier is actually a handle to a true object that’s created on the heap. The heap object can be created either implicitly, as part of the array initialization syntax, or explicitly with a new expression. Part of the heap object (in fact, the only field or method you can access) is the read-only length member that tells you how many elements can be stored in that array object. The ‘ []’ syntax is the only other access that you have to the array object.

The following example shows the various ways that an array can be initialized, and how the array handles can be assigned to different array objects. It also shows that arrays of objects and arrays of primitives are almost identical in their use. The only difference is that arrays of objects hold handles while arrays of primitives hold the primitive values directly. (See page 97 if you have trouble executing this program.)

//: ArraySize.java
// Initialization & re-assignment of arrays
package c08;

class Weeble {} // A small mythical creature

public class ArraySize {
  public static void main(String[] args) {
    // Arrays of objects:
    Weeble[] a; // Null handle
    Weeble[] b = new Weeble[5]; // Null handles
    Weeble[] c = new Weeble[4];
    for(int i = 0; i < c.length; i++)
      c[i] = new Weeble();
    Weeble[] d = {
      new Weeble(), new Weeble(), new Weeble()
    // Compile error: variable a not initialized:
    //!System.out.println("a.length=" + a.length);
    System.out.println("b.length = " + b.length);
    // The handles inside the array are 
    // automatically initialized to null:
    for(int i = 0; i < b.length; i++)
      System.out.println("b[" + i + "]=" + b[i]);
    System.out.println("c.length = " + c.length);
    System.out.println("d.length = " + d.length);
    a = d;
    System.out.println("a.length = " + a.length);
    // Java 1.1 initialization syntax:
    a = new Weeble[] {
      new Weeble(), new Weeble()
    System.out.println("a.length = " + a.length);

    // Arrays of primitives:
    int[] e; // Null handle
    int[] f = new int[5];
    int[] g = new int[4];
    for(int i = 0; i < g.length; i++)
      g[i] = i*i;
    int[] h = { 11, 47, 93 };
    // Compile error: variable e not initialized:
    //!System.out.println("e.length=" + e.length);
    System.out.println("f.length = " + f.length);
    // The primitives inside the array are
    // automatically initialized to zero:
    for(int i = 0; i < f.length; i++)
      System.out.println("f[" + i + "]=" + f[i]);
    System.out.println("g.length = " + g.length);
    System.out.println("h.length = " + h.length);
    e = h;
    System.out.println("e.length = " + e.length);
    // Java 1.1 initialization syntax:
    e = new int[] { 1, 2 };
    System.out.println("e.length = " + e.length);
} ///:~

Here’s the output from the program:

b.length = 5
c.length = 4
d.length = 3
a.length = 3
a.length = 2
f.length = 5
g.length = 4
h.length = 3
e.length = 3
e.length = 2

Edited by Nick Evan: Added code-tags

Votes + Comments
what the ... ?

"Unnecessary crap no one asked you about and no one's impressed by."

I guess you forgot the title to your post.

Votes + Comments
Sounds about right to me.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.