Posted on 2005-04-20
Last Modified: 2010-03-31
Hi Have this:
class IDMatrix {

  public static void main (String args[]) {
    double[][] ID;
    ID = new double[4][4];
    for (int row=0; row < 4; row++) {
      for (int col=0; col < 4; col++) {
        if (row != col) {
        else {
          ID[row][col] = 1.0;
How do i create the html table for this??
Question by:archrajan
    LVL 86

    Accepted Solution

    Something like:

          static void printTable() {
                double[][] ID;
                ID = new double[4][4];

                for (int row = 0; row < 4; row++) {
                      for (int col = 0; col < 4; col++) {
                            if (row != col) {
                                  ID[row][col] = 0.0;
                            } else {
                                  ID[row][col] = 1.0;


    LVL 25

    Author Comment

    Thanks a ton for the speedy response!
    fun and easy!
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    The viewer will learn how to implement Singleton Design Pattern in Java.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now