NGNaman Garginnamangargjava-dsa.hashnode.dev·Oct 1, 2023 · 4 min readJava Conditional statementsJava has the following conditional statements: Use if to specify a block of code to be executed if a specified condition is true. Use else to specify a block of code to be executed, if the same condition is false. Use else if to specify a new cond...00
NGNaman Garginnamangargjava-dsa.hashnode.dev·Sep 30, 2023 · 3 min readJava OperatorsOperators in Java The operator is the symbol that tells the compiler to perform some operation over the expression. Example: 'sum = a + b' where a and b are the operands whereas + is the operator. There are different types of operators in Java. Let's...00
NGNaman Garginnamangargjava-dsa.hashnode.dev·Sep 29, 2023 · 3 min readJava (Data Types and type casting)Data Types As explained in the previous chapter, a variable in Java must be a specified data type: Data types are divided into two groups: Primitive data types - includes byte, short, int, long, float, double, boolean and char Non-primitive data ty...00
NGNaman Garginnamangargjava-dsa.hashnode.dev·Sep 28, 2023 · 3 min readLets create our first Java fileJava Boilerplate code Boilerplate code is the code that is defined as the template which remains the same for every Java file you create. For example, public class JavaBasics{ public static void main(String args[]{ } } In Java, every applica...00
NGNaman Garginnamangargjava-dsa.hashnode.dev·Sep 27, 2023 · 3 min readGet started with JavaJava is a popular programming language, created in 1995. It is owned by Oracle, and more than 3 billion devices run Java. It is used for: Mobile applications (especially Android apps) Desktop applications Web applications Web servers and applicat...01S