package Jai
public class potpie {
public static void main(String[] arg){
String s = "Hey";
System.out.println(s);
}
}
In the output, I want that the string is in bold form
package Jai
public class potpie {
public static void main(String[] arg){
String s = "Hey";
System.out.println(s);
}
}
In the output, I want that the string is in bold form
try this
public static void main(String[] args){
String yourText = "\033[1mThis is a BOLD line\033[0m";
System.out.println(yourText);
}
In this case of yours, where you are trying to print something to the console, you cannot actually change the font.
You can sure change colour, weight of the font you want to print on to the console using ANSI ESCAPE CODES. Using this you can print bold text to the console.