I had an answer but it didnt work

can anyone pls find me the mistakes to this small programs.
1 ) class TestSomething {
public static void main (String[] args) {
int[][] a = new int[7][9];
int i,k,b=0,c=0;
for (i=0; i<a.length; i++)
for (k=0; k<a[0].length; k++) {
a[k] = i * k % 10;
if (b<a[k]) b=a[k];
c++;
System.out.println("Final value of b is: "+b);
System.out.println("Number of places is: "+c);
2) class Test {
int x;
class ArrayTest1 {
public static void main(String args[]) {
int i;
Test TestArray[] = new Test[100];
for (i = 0; i < 100; i ++) {
TestArray.x = i;
System.out.println("We made it!");
thanks for helping me
( I am a student and I am having a test and I found this from past papers)

Its a "feature" of the forums.
Read the [url http://forum.java.sun.com/faq.jsp#format]special tokens link on the posting page.
To get around the problem, when posting code to the forums don't use [i] as an array index (I use [j] instead). Many users of these forums have asked several times for this to be changed, but to no avail; so we just have to live with it.

Similar Messages

Maybe you are looking for

  • Show AppXray dependencies does not work for all projects

    I have three projects. One of them will display the appxray dependncies and the other two will not. When I select show dependencies, nothing happens. There is no logging inside the workshop m7.log.0 but the .log has the following. How do I get this t

  • Galleries within Galleries

    I have a screen that has a horizontal Text Gallery (GalleryA). Inside that gallery is a vertical gallery (Gallery B). Each the template for Gallery B has a check box that I want to use to select that particular item. Each Gallery B should have to hav

  • VT04 - multiple selection variants possible?

    Hello, When we create shipments "manually" via VT01n, we have 2 different selection variants to add deliveries onto the shipments: - one variant which selects all deliveries without route schedule also those for which the goods issue date is in the f

  • Tracking execution of bean used in jsp

    hi, i'm using a bean to get records from a database. but i'm not sure if the bean is actually getting called and executed from the jsp file. i'ld like to get the step by step details about the execution of bean when it is called. is this possible? ho

  • Connecting to SQL Server 2000 from Oracle 9iDS

    hi I want to connect Forms Developer 9i to a SQL Server 2000 Database for integration purposes. Mentioning that I don't have any Oracle servers on my system. Thanks