added content to 100-java-fundamentals (#2491)

pull/2490/head
Koshima Goyal 2 years ago committed by GitHub
parent 1f3b2a280d
commit 022b0e27e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      content/roadmaps/110-java/content/100-java-fundamentals/100-basic-syntax.md
  2. 4
      content/roadmaps/110-java/content/100-java-fundamentals/101-data-types-variables.md
  3. 1
      content/roadmaps/110-java/content/100-java-fundamentals/102-conditionals.md
  4. 4
      content/roadmaps/110-java/content/100-java-fundamentals/103-functions.md
  5. 5
      content/roadmaps/110-java/content/100-java-fundamentals/104-datastructures.md
  6. 3
      content/roadmaps/110-java/content/100-java-fundamentals/106-files-and-apis.md
  7. 2
      content/roadmaps/110-java/content/100-java-fundamentals/106-packages.md
  8. 6
      content/roadmaps/110-java/content/100-java-fundamentals/107-loops.md
  9. 5
      content/roadmaps/110-java/content/100-java-fundamentals/108-exception-handling.md

@ -2,6 +2,9 @@
Understanding the basics is the key to a solid foundation. In this section, learn the basic terminologies, naming conventions, reserved words, conditions, functions, data structures, OOP, packages, etc.
* To print output use --> System.out.println();
* To take input from user --> Scanner or BufferedReader class can be used
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/java-basic-syntax/'>Basic Java Syntax</BadgeLink>
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=81piDKqPxjQ'>Java - Basic Syntax</BadgeLink>

@ -2,6 +2,10 @@
Variable in Java is a data container that stores the data values during Java program execution. Every variable is assigned a data type, which designates the type and quantity of values it can hold. Variable is a memory location name of the data. The Java variables have mainly three types: Local, Instance and Static.
Data Types are divided into two group -
* Primitive - byte,short,int,long,float,double,boolean and char
* Non-Primitive - String, Arrays and Classes
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.guru99.com/java-variables.html'>What are Data Types & Variables?</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/java-variables'>Java Variables</BadgeLink>

@ -6,6 +6,7 @@ Java has the following conditional statements:
* Use `else` to specify a block of code to be executed if the same condition is false
* Use `else if` to specify a new condition to test; if the first condition is false
* Use `switch` to specify many alternative blocks of code to be executed
* Use `?,:` operator to specify one line condition
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.educative.io/answers/what-are-conditional-statements-in-programming'>What are Conditional statements?</BadgeLink>

@ -2,6 +2,10 @@
A method/function is a way to perform some task. Similarly, in programming like Java, a function method is a block of code written to perform a specific task repeatedly. It provides reusability of code. We write the function once and use it many times. It works on the 'DRY' principle i.e., "Do not repeat yourself".
Steps -
1. Define function - datatype function_name(parameters){body}
2. Call function - function_name(values)
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/method-in-java'>Methods/Functions in Java.</BadgeLink>

@ -2,6 +2,11 @@
As the name indicates itself, a **Data Structure** is a way of organizing the data in the **memory** so that it can be used efficiently. Some common data structures are array, linked list, stack, hashtable, queue, tree, heap, and graph.
* Array allocates continuous memory for homogeneous data
* Linked List stores data in nodes with references
* Stack follows Last In First Out principle
* Queue follows First In First Out principle
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/data-structures'>What are Data Structures?</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/data-structure-tutorial'> Data Structures and Algorithms</BadgeLink>

@ -2,6 +2,9 @@
Learn how to work with files i.e., reading, writing and deleting, files and folders, etc. Also, learn how to make API calls, parse the incoming response, and so on.
* FileWriter - this class is useful to create a file by writing characters into it
* FileReader - this class is useful to read data in form of characters from file
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.marcobehler.com/guides/java-files'>How To Work With Files In Java</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/java-file-class'>Java File Class</BadgeLink>

@ -2,6 +2,8 @@
A package is a namespace that mainly contains classes and interfaces. For instance, the standard class `ArrayList` is in the package `java.util`. For this class, `java.util.ArrayList` is called its fully qualified name because this syntax has no ambiguity. Classes in different packages can have the same name. For example, you have the two classes `java.util.Date` and `java.sql.Date`, which are different. If no package is declared in a class, its package is the default package.
To create package use this command -> javac -d directory javafilename
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Official Site' href='https://docs.oracle.com/javase/8/docs/api/java/lang/Package.html'>Packages in Java</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/package'>Java Package</BadgeLink>

@ -1,6 +1,10 @@
# Loops
In Java and other programming languages, loops are used to iterate a part of the program several times. There are three types of loops in Java, `for`, `while`, and `do...while`.
In Java and other programming languages, loops are used to iterate a part of the program several times. There are four types of loops in Java, `for`, `forEach`, `while`, and `do...while`.
* Synatx of `for` loop is `for(initialization;condition;increment/decrement){}`
* Syntax of `forEach` loop is `for(data_type variable:array_name){}`
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/java-for-loop'>What are loops in Java?</BadgeLink>

@ -2,6 +2,11 @@
Exception Handling in Java is one of the effective means to handle the runtime errors so that the regular flow of the application can be preserved. Java Exception Handling is a mechanism to handle runtime errors such as ClassNotFoundException, IOException, SQLException, RemoteException, etc.
There are three types of exceptions -
1. Checked Exception - exceptions checked at compile time. Example - IOException
2. Unchecked Exception - exceptions checked at run time. Example - NullPointerException
3. Error - It is irrecoverable. Example - OutOfMemoryError
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/exceptions-in-java/'>Exception Handling - G4G</BadgeLink>
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=W-N2ltgU-X4'>Understanding Java Exceptions</BadgeLink>

Loading…
Cancel
Save