Posts

Showing posts from July, 2020

How to setup Python Environment in your PC

Image
පයිතන් කෝඩ් කරන්න setup එක හදාගනිමු. Startup to code python. අද blog එකෙන් මේ ගැන කතාකරමු. When we run java we need a jdk. As we run java we we need a setup for run python. Step 01: Download python setup from this download link or google it directly. https://www.python.org/downloads/ Step 02: Download an IDE to code. Download pycharm IDE ,it is a great environment for python coding. Or else you can use eclipse or another python IDE [ Intergrated Developement Environment ] https://www.jetbrains.com/pycharm/download/#section=windows Step 03 : Install python setup and IDE to your pc.This process will take several minutes. Step 04: Now you can open pycharm and open a new python project then open a new python file in it. Watch the video with sinhala on my youtube channel to see how it done . https://youtu.be/iWJeQHTvciQ [Instagram] https://www.instagram.com/_sathsa_ra/ [LinkedIn ] https://www.linkedin.com/in/thathsara-hewage🇱🇰-sathsara-43046b191 ...

How Stack works : with java

Image
Stack එකක් කියන්නෙ මොකක්ද ?  මේ blog post එකෙන් ඒ ගැන කතා කරමු. What is a stack? Allows access to only one data item; the last item inserted If you remove this item, then you can access the next-to-last item inserted what happens in a stack? In a stack all insertions and deletions are made at one end (Top). Insertions and deletions are restricted from the Middle and at the End of a Stack Adding an item is called  Push Removing an item is called  Pop Elements are removed from a Stack in the reverse order of that in which the elements       were inserted into the Stack The elements are inserted and removed according to the Last-In-First-Out (LIFO) principle. Here is the java program to learn the work of a stack StackX.java ########################################################## //tutorials_by_sathsara //www.sathsaratutorials.blogspot.com //On_17th_july_2020 package stack; public class StackX {   ...