daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "package com.api does not exist".
  2.    
  3. import com.api.APIUser;
  4.  public class Test{
  5.   APIUser ap = new APIUser();
  6.   ap .login();
  7.   public static void main(String[] args){
  8.     //to do
  9.   }
  10.  
  11. }
  12.    
  13. package com.api
  14. public class APIUser{
  15.   public string login(){
  16.    //to do
  17.    return string;
  18.  }
  19.  
  20. }
  21.    
  22. import com.api.APIUser;
  23.  
  24. public class Test {
  25.     // APIUser ap = new APIUser(); // This call should be in the method body,
  26.     // there is no use to keep it at the class level
  27.     // ap.login(); // This call should be in method body
  28.     public static void main(String[] args) {
  29.         // TO DO
  30.         APIUser ap = new APIUser();
  31.         ap.login();
  32.     }
  33. }
  34.    
  35. package com.api; // added termination here
  36.  
  37. public class APIUser {
  38.     //access specifier should be public
  39.     public string login(){
  40.        //to do
  41.        //return string;//return some value from here, since string is not present this will lead to error
  42.          return "string";
  43.      }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top