title: Java Method isn't implementing what it is supposed to
body: <p>Hey everyone very new to coding!
  So I was trying to make a calculator program using object oriented programming in Java however when I try to call my method for addition it doesn't do the job entirely so what am I doing wrong here ?
  Thanks in advance :)</p>
  <pre><code>import java.util.Scanner;
      
      public class CalculatorOOP {
  
          Scanner input = new Scanner(System.in);
  
      public static double currentValue;
  
      public double valueInput;
      
      public CalculatorOOP(double valueTyped){
  
          valueTyped = currentValue;
      }
      
      public double addToValue(){
  
          System.out.println(&quot;Type the value you want to add:&quot;);
          double valueToAdd = input.nextDouble();
  
           double valueAfterAddition = CalculatorOOP.currentValue + valueToAdd;
  
          return valueAfterAddition;
  
      }
      
      public double substractToValue(){
  
          System.out.println(&quot;Type the value you want to substract:&quot;);
  
          double valueToSubstract = input.nextDouble();
  
          double valueAfterSubstraction = 
  CalculatorOOP.currentValue - valueToSubstract;
  
          return valueAfterSubstraction;
      }
      
      public double multiplyValue(){
  
          System.out.println(&quot;Type the factor value:&quot;);
  
          double factor = input.nextDouble();
  
          double valueAfterMultiplication = CalculatorOOP.currentValue * factor;
  
          return valueAfterMultiplication;
      }
          
      public double divideValue(){
  
          System.out.println(&quot;Type the divisor value:&quot;);
  
          double divisor = input.nextDouble();
  
          double valueAfterDivision = CalculatorOOP.currentValue / divisor;
  
          return valueAfterDivision;
      }
      }
  
  
  
  
  import java.util.Scanner;
  
  public class Main {
  
      public static void main(String[]args){
  
          Scanner input = new Scanner(System.in);
  
          System.out.println(&quot;Type a value:&quot;);
  
          double valueInput = input.nextDouble();
  
          CalculatorOOP obj = new CalculatorOOP(valueInput);
  
          System.out.println(&quot;Enter the calculation option (1, 2, 3, or 4):&quot;);
  
          int optionEntered = input.nextInt();
  
          switch (optionEntered){
  
              case 1 : obj.addToValue();
  
          }
  
  
          }}
  </code></pre>
  <p>Here this is what I get when running the code however it is not performing the addition it is just asking for values</p>
  <pre><code>Type a value:
  2
  Enter the calculation option (1, 2, 3, or 4):
  1
  Type the value you want to add:
  4
  
  Process finished with exit code 0
  </code></pre>