lenght of the string

closed account (oL6q5Di1)
hi can ask a question to all who can be convert this is java this is my assignment i need this so plssssssss all help me im noobie about java





#include <iostream>
#include <string>
using namespace std;

int main ()
{
string str ("My name is Charles Babbage.");

cout << "My name is Charles Babbage.\n";

cout << "Length: " << str.length();
cout <<"\n";

string st ("My name is Allan Turing.\n");
cout <<"\n";
cout << "My name is Allan Turing.";
cout <<"\n";
cout <<"Length: "<< st.length();
cout <<"\n";
cout <<"\n";

return 0;
}
1. Asking for code.
2. Asking about Java.
3. Double posting.
You give "fail" a new meaning.
closed account (oL6q5Di1)
yeah im asking about code in java program because i want to see the out come of this C++ in java thnats all thnks
http://www.cplusplus.com/forum/articles/1295/
Notice the part www.cplusplus.com, even if someone here knows Java is unlikely for you getting an answer for the reasons posted by helios.
I would also add:
4. Asking something is easy to find using Google
Topic archived. No new replies allowed.