Cursive or bold type by console

0

Good morning, everyone. I've been looking for how to text a number and I have not found anything clear.

The idea was to find the largest and smallest value of the matrix and after finding them, give it the bold format.

int mayor = matriz[0][0];
int menor = matriz[0][0];
    for (int i = 0; i < matriz.length; i++){
        for (int j = 0; j < matriz.length; j++){
            if(matriz[i][j] < menor)
                menor = matriz[i][j];
            else if (matriz[i][j] > mayor)
                mayor = matriz[i][j];
        }
    }

Thanks in advance.

Good afternoon.

    
asked by Jordi 27.01.2018 в 15:07
source

1 answer

1

This really depends on what type of console is being used. For IDE like Netbeans and Eclipse, I'm not sure if it can affect the source. But for most terminals, the following escape character works:

String textoEnNegrita = "Java_Prof_Level";

System.out.print("3[0;1m" + textoEnNegrita);

The ANSI sequence "3[0;1m" before the string should be in bold

    
answered by 27.01.2018 / 18:49
source