Task - Immutability #38
Replies: 33 comments
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
`package StringOperations; } public class Immutable { } |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
final class Demo { } public class Immutable { } |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
import java.util.Scanner; |
Beta Was this translation helpful? Give feedback.
-
|
`package Week4; final class Immutable { private final String name; public Immutable() { public Immutable(String name, String location) { public String getName() { public String getLocation() { @OverRide } public class ImmutableClass { } |
Beta Was this translation helpful? Give feedback.
-
|
import java.io.*; |
Beta Was this translation helpful? Give feedback.
-
|
`final class ImmutableClass{ } public class Immutable { } |
Beta Was this translation helpful? Give feedback.
-
|
import java.util.*; final class Immutablecl { } public class Immutable { } |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
final class Immutable } |
Beta Was this translation helpful? Give feedback.
-
|
`final class Student{ } public class ImmutableClass { |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
`package all_strings; import java.util.*; public class Immutable { } final class ImmutableStrings { } |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
`import java.util.Scanner; final class Immutable { } |
Beta Was this translation helpful? Give feedback.
-
|
final class Immutable // 1.making all data memebers final //setters are not allowed int getId() } public class Ex } |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
And I am Immutable
Immutable class in java means that once an object is created, we cannot change its content.
WAP to create and implement an immutable class.
Beta Was this translation helpful? Give feedback.
All reactions