How to use \ t Escape sequences different for mac and Windows-java

** When used in a string **


		System.out.println("delicious\t mandarin orange");

Console: Delicious oranges

** When using variables **


		String sample1 = "normal";
		String sample2 = "Strawberry";
		System.out.println(sample1 + "\t" + sample2);

Console: Normal strawberry



		System.out.println(sample1 + "\t" + sample2);
		System.out.println(sample1 + "¥t" + sample2);

Both \ and \ can be used



		System.out.println(sample1 + "\t" + sample2);
		System.out.println(sample1 + "¥t" + sample2); //Backslash and backslash are distinguished on mac

console: Ordinary strawberry Ordinary ¥ t strawberry

** Escape sequence (partial) **

Escape sequence Meaning of symbols Center align
¥" Double quotation
¥' Single quote
column new line
will ¥(Circle)mark will
be be be
left right center
aligned aligned aligned

Recommended Posts

How to use \ t Escape sequences different for mac and Windows-java
How to use nginx-ingress-controller with Docker for Mac
How to use Font Awesome icon for ul and li
Procedures for passing RealmObject to Fragment and how to use Parceler
How to use StringBurrer and Arrays.toString.
How to install JMeter for Mac
How to use EventBus3 and ThreadMode
How to use equality and equality (how to use equals)
How to use binding.pry for view files
How to use OrientJS and OrientDB together
How to install Play Framework 2.6 for Mac
How to set up and use kapt
[Ruby] How to use slice for beginners
How to use substring and substr methods
How to use @Builder and @NoArgsConstructor together
How to set different source / target versions for production code and test code
(For beginners) [Rails] Time saving tech! How to install and use slim
[Java] How to use FileReader class and BufferedReader class
[Ruby] How to use gsub method and sub method
How to use an array for HashMap keys
How to use Segmented Control and points to note
How to set up and operate jEnv (Mac)
How to use scope and pass processing (Jakarta)
[Rails] How to use Gem'rails-i18n' for Japanese support
[For super beginners] How to use autofocus: true
[Java] How to use Calendar class and Date class
Thinking about how to use Ionic-Native, Hybrid and HTML5 for mobile app production
How to use an array for a TreeMap key
How to use Map
How to use rbenv
How to use letter_opener_web
How to use with_option
How to use fields_for
How to use java.util.logging
How to use map
How to use collection_select
How to use Twitter4J
How to use active_hash! !!
How to use MapStruct
How to use hidden_field_tag
Use different TransactionManager for metadata and step in spring-batch
How to use TreeSet
How to use Truth (assertion library for Java / Android)
[How to use label]
How to use identity
[For those who create portfolios] How to use font-awesome-rails
How to use hashes
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
How to use JUnit 5
How to make Laravel faster with Docker for Mac
How to use RealSense with ubuntu 20.04 and ROS Noetic
How to install Gradle and Kotlin with SDKMAN (Mac)
How to use Dozer.mapper
How to use Gradle
How to use org.immutables
How to use
How to use VisualVM
Explanation of Ruby on rails for beginners ④ ~ Naming convention and how to use form_Tag ~
How to use and apply Java's JFrame / Canvas class
How to use GitHub for super beginners (team development)
How to use Map