Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

afficher matrice java

int[][] matrice =
{
   { 0, 1, 4, 3 } , // tableau [0] de int	(1)
   { 5, 7, 9, 11, 13, 15, 17 } // tableau [1] de int	(2)
};

System.out.println(Arrays.toString(matrice[0])); // Affiche (1)
System.out.println(Arrays.toString(matrice[1])); // Affiche (2)
Comment

afficher matrice java

import java.lang.*;
import java.util.*;
  
// Driver class
class Main {
    public static void main(String[] args)
    {
        Student[] arr = { new Student(111, "bbbb", "london"),
                          new Student(131, "aaaa", "nyc"),
                          new Student(121, "cccc", "jaipur") };
  
        System.out.println(Arrays.toString(arr));
    }
}
  
// A class to represent a student.
class Student {
    int rollno;
    String name, address;
  
    // Constructor
    public Student(int rollno, String name,
                   String address)
    {
        this.rollno = rollno;
        this.name = name;
        this.address = address;
    }
  
    // Used to print student details in main()
    @override
    public String toString()
    {
        return this.rollno + " " + this.name + " " + this.address;
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: android studio Toast usage 
Java :: java compare lists 
Java :: dockerfile spring boot 
Java :: java unique queue 
Java :: springbootservletinitializer maven dependency 
Java :: implements java 
Java :: potenzieren java 
Java :: convert jwt claim to string java 
Java :: singleton implementation 
Java :: Data provider using junit 
Java :: How to perform an iterative inorder traversal through a binary search tree, in Java? 
Java :: is the function same as method in java 
Java :: boolean operators in java 
Java :: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251) 
Java :: math square java 
Java :: java list tostring 
Java :: 9999999999999 
Java :: java string 
Java :: Write code to declare an array that will hold calendar months (.e. January to December) java 
Java :: change fab image programatically 
Java :: how to make window in java 
Java :: hibernate onetone with mapsid 
Java :: reverse a doubly linked list 
Java :: java questions 
Java :: math class in java 
Java :: java multi thread 
Java :: random value between 10-20 
Java :: Java Method Create Basic 
Java :: comments java 
Java :: what is encapsulation in java 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =