Answers for "in java why do we use '!'"

0

what can you do with java

Java is a very popular programming language.
Some things you can do with it:
	1) Make the backend of a website with spring (https://docs.spring.io/spring/docs/current/spring-framework-reference/")
    2) Make an android application (https://developer.android.com/docs)
    3) Make a simple desktop application with "JavaFX"
Posted by: Guest on May-19-2020
0

why we are using this. in java

/*this keyword in Java is a reference variable that refers to the current object 
of a method or a constructor. The main purpose of using this keyword in Java is
to remove the confusion between class attributes and parameters that have same names.
For Example; if we have */

class Account{
int a;
int b;

 public void setData(int a ,int b){
  a = a;
  b = b;
 }
 public void showData(){
   System.out.println("Value of A ="+a);
   System.out.println("Value of B ="+b);
 }
 public static void main(String args[]){
   Account obj = new Account();
   obj.setData(2,3);
   obj.showData();
 }
}
/*it's Output will be a=0 & b=0;
but if we replace this.a=a & this.b=b;
So now the answer will be a=2 ,a=3.*/
Posted by: Guest on August-16-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language