Hi there , to day we make our Own Libraries in java
2. Fast Go to NetBeans Create New Project . Name it "ezcod"
3. Create package Name it " Tech_inbox "
4. Create Java class " founder "
5. This is your Class
6. Create a Method Whatever you like it. I create " FoundersOfGoogle "
I use String return type Data.
" Larry Page, Sergey Brin "
Code Here :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Tech_inbox; | |
/** | |
* | |
* @author coolsasindu@gmail.com | |
* @author https://ezcod.blogspot.com/ | |
* @author https://www.youtube.com/channel/UCIDeTJ1PXVcRbFrmyDKQKkg | |
*/ | |
public class Founder { | |
public static String FoundersOfGoogle() { | |
return "Larry Page, Sergey Brin"; | |
} | |
public static String FoundersOfFacebook() { | |
return "Mark Zuckerberg, Eduardo Saverin, Andrew McCollum, Dustin Moskovitz, Chris Hughes"; | |
} | |
//github | |
public static String FoundersOfGitHub() { | |
return "Tom Preston-Werner, Chris Wanstrath, Scott Chacon, P. J. Hyett"; | |
} | |
public static String FoundersOfTwitter() { | |
return " Jack Dorsey, Evan Williams, Biz Stone, Noah Glass"; | |
} | |
} |
7. Clean and Build Project (Shift +F11) NetBeans short cut
9. Create new Project and Import ezcod jar file in to Libraries
10. Open New project main class file
System.out.println( Founder.FoundersOfGoogle() );
And import Tech_inbox from ezcod libraries
import Tech_inbox.Founder;
12 Run it like this.
13. Code here :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mylib_test; | |
import Tech_inbox.Founder; | |
public class Mylib_test { | |
/** | |
* @author coolsasindu@gmail.com | |
* @author https://ezcod.blogspot.com/ | |
* @author https://www.youtube.com/channel/UCIDeTJ1PXVcRbFrmyDKQKkg | |
*/ | |
public static void main(String[] args) { | |
System.out.println(Founder.FoundersOfGoogle() ); // google | |
System.out.println(Founder.FoundersOfFacebook() ); //facebook | |
} | |
} |
Tags:
javacode