String

Hi friends,i have to create one String with the text : B=="T"If i create the String like: String formula = "B=="T""; obviously it doesn't work.How can i do?
[185 byte] By [marlborinoa] at [2007-10-3 3:17:59]
# 1
String B = "T" or just B = "T"
pujolsa at 2007-7-14 21:09:40 > top of Java-index,Java Essentials,Java Programming...
# 2
Sorry,i have explained not well my problem because my english isn't good.My String name must contain all the string: if (B=="T")I hope that now it's more clear
marlborinoa at 2007-7-14 21:09:40 > top of Java-index,Java Essentials,Java Programming...
# 3
Not clear at all. Strings don't have "names".If you wanted to ask how to include a quote inside a string literal, then the answer is you escape it by putting a backslash before it. Like this:String answer = "This is a \"quote\".";
DrClapa at 2007-7-14 21:09:40 > top of Java-index,Java Essentials,Java Programming...
# 4

> If you wanted to ask how to include a quote inside a

> string literal, then the answer is you escape it by

> putting a backslash before it. Like this:>String answer = "This is a \"quote\".";

Just to help the OP a bit because English is not his/her native language:String formula= "B == \"T\"";

kind regards,

Jos

JosAHa at 2007-7-14 21:09:40 > top of Java-index,Java Essentials,Java Programming...
# 5
Are you saying that the variable name must have embedded equals signs?If so, something is horribly wrong with your design.
paulcwa at 2007-7-14 21:09:40 > top of Java-index,Java Essentials,Java Programming...