Posts

Showing posts from July, 2021

Java Lesson 5 - Data Types

Image
     We will discuss more about Java Data Types in this tutorial. Data types plays a major role in java programming. As we discussed earlier, variables are used to store values temporarily. But these values can vary depending on the situations. Sometime, we want to store an integer value like 55 or 34. Sometime, we want to store a floating point value like 10.5 or 42.562. Sometime, we want to store a string value like "Hello" or "21/12/2021". Therefore the type of the value a variable can hold should be changed with the value we want to store. This is where Data Types come in handy. We use Data Types to allow variables to be able to hold different types of values.

Node.js සිංහලෙන් ඉගෙන ගමු - පාඩම් මාලාව 7

Image
     අපගේ Dummy Website එකෙහි ArticlesPage.html එකෙහි ක්‍රියාකාරීත්වය මෙම පාඩමෙන් සාදාගමු. මෙහිදී පරිශීලකයා ArticlesPage.html එකට පැමිනි පසු Articles Load වී පෙන්විය යුතුය. මේ සඳහා පලමුව DummyWebsite Folder එක තුල articles.js File එක සාදාගන්න. එයට පහත Code එක ඇතුලත් කරන්න.

Java Lesson 4 - Variables

Image
       In this tutorial, we will learn these topics - what variables are, how to use variables in Java, and the types of variables. What is a variable:      As the name suggests, a variable is whose value can vary from time to time. For an example, we are given 45, 87 written inside two boxes on a paper using a pencil, and we are asked to swap them: In order to swap them, first we remember one of the numbers and erase it: Then erase the other number and re write in other box: Now we write the number we remembered in the empty box:      Finally, we have swapped the numbers. Her e we remembered a number during the swapping process. Even though we can remember something without any effort, computer programs do not possess such ability. In such scenarios, computer programs have variables that we can store a value temporarily. We can change its value whenever we want.      Every time we create a variable in a computer program, ...

Node.js සිංහලෙන් ඉගෙන ගමු - පාඩම් මාලාව 6

Image
     මෙම පාඩමෙන් අපේ Website එකේ Registration හා Login ක්‍රියාවලිය සකසා ගමු. මේ සදහා පළමුව ArticlesPage.html නමින් Webpage එකක් public Folder එක තුල සකසාගමු. User කෙනෙක් Website එකට Log වීමෙන් අනතුරුව ArticlesPage.html එක පෙන්වීම සිදුවේ.එම සකසාගත් ArticlesPage.html Webpage එකට පහත Code එක අතුලත් කරන්න. මෙහිදී කිසිවක් සිදුනොවන අතර, Articles ලෙස Webpage එකෙහි Title එක පමනක් පෙන්වයි.

Java Lesson 3 - Comments

Image
     Java comments are statements that are not compiled by the compiler. Therefore, they will not be executed when the Java program is running. The comments are used to provide information and explanation about the Java code that we write. Whenever someone else reads our code, comments make it easier for the person to understand our code. On some occasions, we can use comments to stop some of our code from being executed when we are testing our application. There are three types of comments, Single Line Comments Multi Line Comments Documentation Comments 1. Single Line Comments     Single Line Comments start with two forward slashes (//) and any text between // and the end of the line will be ignored by Java compiler. This is a Single Line Comment before a line of code:           //This is a comment           System.out.println("Hello Java"); This is a Single Line Comment at the end of a line of code ...

Java Lesson 2 - Aspects of Java Environment

Image
     We are going to discuss the aspects of the Java environment in this tutorial, such as Java compiler Bytecode JVM JDK, JRE      Before learning about what is under the hood of Java, let's have a look at what we have done up to now. In the previous lesson, we created our first Java program, Main.java, which print "Hello Java" to our command prompt (Terminal).