Skip to content

Commit

Permalink
udemy learnings added
Browse files Browse the repository at this point in the history
  • Loading branch information
SadineniAbhi committed Sep 25, 2023
1 parent 7e89ba4 commit b5528d8
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 12 deletions.
6 changes: 6 additions & 0 deletions Chars.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public class Chars {
public static void main(String[] arg){
char potions = 'a';
char arithmancy = 'a';
}
}
12 changes: 0 additions & 12 deletions DataTypes.java

This file was deleted.

10 changes: 10 additions & 0 deletions Double.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class Double {
public static void main(String[] args){
double percentage = 73.5;
System.out.println("This is my percentage "+percentage);

double money = 20;
int people = 3;
System.out.println(money/people);
}
}
12 changes: 12 additions & 0 deletions Intergers.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class Intergers {
public static void main(String[] args){
int passengerCount = 8;
//System.out.println(passengerCount);

int busTickets = passengerCount;
//System.out.println(busTickets);

passengerCount = 100;
//System.out.println(passengerCount);
}
}
8 changes: 8 additions & 0 deletions Long.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class Long {
public static void main(String[] args){
long globalPopulations = 8000000000L;
System.out.println("globalPopulation is "+globalPopulations);
long dailyWebserches = 9090990990l;
System.out.println("dailywebserches is "+dailyWebserches);
}
}
10 changes: 10 additions & 0 deletions Strings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class Strings {
public static void main(String[] args){
String firstName = "Abhijeeth";
String secondName = "Sadineni";
int age = 19;
String myName = firstName + secondName;
String facts = myName + " is " + age + " years old. ";
System.out.println(facts);
}
}
19 changes: 19 additions & 0 deletions UdemyChallenge3.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
public class UdemyChallenge3 {
public static void main(String[] args){
double p = 0;
int oneApplePrice = 1;
int numOfCustomers = 0;
int numOfApples = 500;
int numOfApplesSold = 0;
numOfCustomers++;
numOfApplesSold+=4;
numOfCustomers++;
numOfApplesSold+=20;
numOfCustomers++;
numOfApplesSold+=200;
System.out.println("wow so far you made "+(numOfApplesSold*oneApplePrice));
System.out.println(numOfCustomers +" customers love your apples");
System.out.println("you have "+(numOfApples-numOfApplesSold)+" left we will sell tommorow");

}
}

0 comments on commit b5528d8

Please sign in to comment.