Home
Random
Nearby
Log in
Settings
Donate Now
If Wikipedia is useful to you, please give today.
About Wikipedia
Disclaimers
Search
Java syntax: Difference between revisions
Article
Talk
Language
Watch
View history
Edit
Browse history interactively
← Previous edit
Next edit →
Content deleted
Content added
Visual
Wikitext
Revision as of 16:29, 25 August 2025
edit
24.50.56.74
(
talk
)
→
Methods
← Previous edit
Revision as of 16:58, 25 August 2025
edit
undo
24.50.56.74
(
talk
)
→
Constructors and initializers
Next edit →
Line 1,283:
String str;
Foo() {
// Constructor with no arguments
Foo() {
}
▼
Foo(String str) {
// Constructor with one argument
▼
// Initialization
Foo(String str) {
▲
}
▲
Foo(String str) { // Constructor with one argument
this.str = str;
}