Uploaded December 2024 | Updated September 2026, 1 week ago
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// โ variable = A reusable container for a value.
// A variable behaves as if it was the value it contains.
// ๐ฅ Primitive = simple value stored directly in memory (stack)
// ๐ฆ Reference = memory address (stack) that points to the (heap)
// ๐ฅ Primitive vs ๐ฆ Reference
// --------- ---------
// int string
// double array
// char object
// boolean
int age = 21;
int year = 2025;
int quantity = 1;
double price = 19.99;
double gpa = 3.5;
double temperature = -12.5;
char grade = 'A';
char symbol = '!';
char currency = '$';
boolean isStudent = true;
boolean forSale = false;
boolean isOnline = true;
String name = "Bro Code";
String food = "pizza";
String email = "fake123@gmail.com";
String car = "Mustang";
String color = "red";
System.out.println("Your choice is a " + color + " " + year + " " + car);
System.out.println("The price is: " + currency + price);
if(forSale){
System.out.println("There is a " + car + " for sale");
}
else{
System.out.println("The " + car + " is not for sale");
}
}
}
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// โ variable = A reusable container for a value.
// A variable behaves as if it was the value it contains.
// ๐ฅ Primitive = simple value stored directly in memory (stack)
// ๐ฆ Reference = memory address (stack) that points to the (heap)
// ๐ฅ Primitive vs ๐ฆ Reference
// --------- ---------
// int string
// double array
// char object
// boolean
int age = 21;
int year = 2025;
int quantity = 1;
double price = 19.99;
double gpa = 3.5;
double temperature = -12.5;
char grade = 'A';
char symbol = '!';
char currency = '$';
boolean isStudent = true;
boolean forSale = false;
boolean isOnline = true;
String name = "Bro Code";
String food = "pizza";
String email = "fake123@gmail.com";
String car = "Mustang";
String color = "red";
System.out.println("Your choice is a " + color + " " + year + " " + car);
System.out.println("The price is: " + currency + price);
if(forSale){
System.out.println("There is a " + car + " for sale");
}
else{
System.out.println("The " + car + " is not for sale");
}
}
}
![MongoDB logical operators explained
#MongoDB #course #tutorial
db.students.find({$and: [{fullTime:true}, {age:{$lte:22}}]})
db.students.find({$or: [{fullTime:true}, {age:{$lte:22}}]})
db.students.find({$nor: [{fullTime:true}, {age:{$lte:22}}]})
db.students.find({age:{$not:{$gte:30}}}) MongoDB logical operators explained](https://i.ytimg.com/vi/Tnjtj8cCJPY/mqdefault.jpg)







![Learn C programming variables easy! โ
#coding #programming #cprogramming
00:00:00 int
00:04:06 float
00:07:35 double
00:09:26 char
00:11:34 char[]
00:14:37 bool
00:18:55 extra details
// variable = A reusable container for a value.
// Behaves as if it were the value it contains.
// int = whole numbers (4 bytes in modern systems)
// float = single-precision decimal number (4 bytes)
// double = double-precision decimal number (8 bytes)
// char = single character (1 byte)
// char[] = array of characters (size varies)
// bool = true or false (1 byte) Learn C programming variables easy! โ](https://i.ytimg.com/vi/WrFEtUzVcnw/mqdefault.jpg)
![Learn runtime polymorphism in 5 minutes! ๐คทโโ๏ธ
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Runtime polymorphism = When the method that gets executed is decided
// at runtime based on the actual type of the object.
Scanner scanner = new Scanner(System.in);
Animal animal;
System.out.print(Would you like a dog or a cat? (1 = dog, 2 = cat): );
int choice = scanner.nextInt();
if(choice 1){
animal = new Dog();
animal.speak();
}
else if(choice 2){
animal = new Cat();
animal.speak();
}
}
} Learn runtime polymorphism in 5 minutes! ๐คทโโ๏ธ](https://i.ytimg.com/vi/YDKHfqzaF30/mqdefault.jpg)
