Is there an easy way to merge multiple, say char arrays to get a char matrix? I have 8 arrays below with 64 chars each and I want to merge to a matrix with 8 rows and 64 cols.
package august26;
import java.util.Scanner;
public class XBits {
public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    long n1 = input.nextInt();
    long n2 = input.nextInt();
    long n3 = input.nextInt();
    long n4 = input.nextInt();
    long n5 = input.nextInt();
    long n6 = input.nextInt();
    long n7 = input.nextInt();
    long n8 = input.nextInt();
    String s1 = String.format("%64s", Long.toBinaryString(n1)).replace(' ', '0');
    String s2 = String.format("%64s", Long.toBinaryString(n2)).replace(' ', '0');
    String s3 = String.format("%64s", Long.toBinaryString(n3)).replace(' ', '0');
    String s4 = String.format("%64s", Long.toBinaryString(n4)).replace(' ', '0');
    String s5 = String.format("%64s", Long.toBinaryString(n5)).replace(' ', '0');
    String s6 = String.format("%64s", Long.toBinaryString(n6)).replace(' ', '0');
    String s7 = String.format("%64s", Long.toBinaryString(n7)).replace(' ', '0');
    String s8 = String.format("%64s", Long.toBinaryString(n8)).replace(' ', '0');
    s1.toCharArray();
    s2.toCharArray();
    s3.toCharArray();
    s4.toCharArray();
    s5.toCharArray();
    s6.toCharArray();
    s7.toLowerCase();
    s8.toCharArray();
    input.close();
}
}
toCharArray()returns an array, and you're not storing that returned array anywhere, making those method calls an expensive no-op. In addition, you should be using arrays to store the results of yourinput.nextInt()calls and your formatted strings, not individual variables. That would allow you to useforloops and avoid all that repetitive code.