What if I do not provide the string array as the argument to the method?
No Answer is Posted For this Question
Be the First to Post Answer
Is openjdk the same as jdk?
What is a bean class?
What are tags in java?
When a thread is created and started, what is its initial state?
How can I write a program that takes command line input?
What is jpa implementation?
What is the meaning of the words public, static and void?
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.
Explain main thread under thread class execution?
What type of parameter passing does java support?
why is java not 100% oops?
What are the benefits of a jar file?