java how to print an array
import java.util.Arrays;
class Scratch{
public static void main(String[] args){
int[] arr = new int[3];
System.out.println( Arrays.toString( arr ));
//prints [0, 0, 0]
}
}
java how to print an array
import java.util.Arrays;
class Scratch{
public static void main(String[] args){
int[] arr = new int[3];
System.out.println( Arrays.toString( arr ));
//prints [0, 0, 0]
}
}
print in java
//print and create new line after
System.out.println("text");
System.out.println(String);
//You can use any variable type, not just strings, although
//they are the most common
//Print without creating a new line
System.out.print("text");
System.out.print(String);
how to print array elements in java
import java.util.Arrays;
public class Array {
public static void main(String[] args) {
int[] array = {1, 2, 3, 4, 5};
System.out.println(Arrays.toString(array));
}
}
java how to print a string[]
String[] array = new String[] {"John", "Mary", "Bob"};
System.out.println(Arrays.toString(array)); // [John, Mary, Bob]
how to print array
System.out.println(Arrays.toString(array));
how to print a array js
var array = [1,2,3]
for(var i = 0; i < array.length ; i++){
console.log(array[i])
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us