This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I make a String bold in java  RSS feed

 
Stanley Mungai
Ranch Hand
Posts: 155
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys am reading from a text file and passing the String to am Email Body. Is there a way of making the String Bold. For example




is there a way of making the String Line bold when it is transferred to the email body??
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strings by themselves don't contain any formatting - they're just a collection of characters. Whether you can add formatting to your email depends on the type of email you're creating. So if it's a plain text email, there's nothing you can do. If you're creating an HTML email then you can add HTML formatting (so you can put <b> tags around the text in question). This is going to be determined by how the email is getting sent, which isn't part of the code you're showing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!