What is tight coupling in java?
Answer / Manvir Singh
Tight coupling in Java refers to a strong dependency between classes where changes in one class have direct and significant impact on other classes.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why is javac not recognized?
What is lambda expression in mvc?
What is injection in java?
Is java Class Thread safe ???? How to make java Class Thread safe ??
What is csrf in java?
What is difference between loosely coupled and tightly coupled in java?
Why java is better than node.js?
What is jep in java?
public class Dog { private int weight; public int getweight(){ return weight; } public void SetWeight(int newWeight){ if (newWeight > 0){ weight = newWeight; } } } public class TestDog { public static void main(String[] args) { Dog d = new Dog(); System.out.println("Dog d's weight is " + d.getWeight()); d.setWeight(42); System.out.println("Dog d's weight is " + d.getWeight()); d.setweight(-42); System.out.println("Dog d's weight is " + d.getWeight()); } } class dog is compiled but there is an error in class TestDog when compiled and the error is with dot notations. I want to kmow why there is error in testdog class when compiled.
How do I install jdk?
What is loose coupling in java?
How do I export a java project?