Java example
Java environment setting example
Java example – How to compile a Java file?
Java Example - How to run a compiled class file in Java?
Java Example - How to execute a specified class file directory (classpath)?
Java Instance – How to check the version of Java currently running?
Java String
-
Java Example – String comparison
Java Example – Find the last occurrence of a string
Java Example – Delete a string A character in
Java Example - String Replacement
Java Example - String Reverse
-
Java Example-String Search
Java Example-String Splitting
Java Example-String Lowercase Conversion to Uppercase
Java Example - Test whether two string areas are equal
Java Example - String Performance Comparison Test
Java Example-String Optimization
Java Example-String Formatting
Java Example-Concatenation String
Java Array
Java Example – Array Sorting and Element Search
Java Example – Adding Elements to Array
Java Example – Get Array Length
Java Example – Reverse Array
Java Example – Array output
Java example – Array gets the maximum and minimum value
Java example – Array merge
-
Java Example – Array Filling
Java Example – Array Expansion
Java Example – Array Sorting and Search
Java Example – Delete Array Elements
Java Example – Array Difference
Java Example – Array Intersection
Java Example – Find the specified element in the array
Java Example – Determine whether the array is equal
Java Example - Array Union
Java Time Processing
Java Example - Formatted Time (SimpleDateFormat)
Java Example - Get the current time
Java Example - Get the year, month, etc.
Java Example - Timestamp conversion Time to complete
Java Method
Java Example – Method Overload
Java Example – Output Array Elements
Java Example – Tower of Hanoi Algorithm
Java Example – Fibonacci Sequence
Java Instance – Factorial
Java Instance – Method Override
Java Instance – instanceOf Keyword Usage
Java Example – break keyword usage
Java Example – continue keyword usage
Java Example – Label (Label)
Java Example – Use of enum and switch statements
Java Example – Use of Enum (enumeration) constructor and method
Java Example – Use of for and foreach loops
Java Example – Use of Varargs variable parameters
Java Example – Overloading Using Varargs in the (overloading) method
Java File Operation
Java Example - File Writing
Java Example - Read file content
Java Example - Delete file
Java Example - Copy file content to another A file
Java Example - Append data to the file
Java Example - Create a temporary file
Java Example - Modify the last modification date of the file
Java Example - Get the file size
Java Example - File Rename
Java Example - Set file read-only
Java Example - Check whether the file exists
Java Example- Create a file in the specified directory
Java instance-get file modification time
Java instance-create file
Java Example - File Path Comparison
Java Directory Operation
Java Example - Recursive Directory Creation
Java Example - Delete Directory
Java Example - Determine whether the directory is empty
Java Example - Determine File Whether to hide
Java instance-get directory size
Java instance-find files in the specified directory
-
Java Example - Get the upper-level directory of the file
Java Example - Get the last modification time of the directory
Java Example - Print directory structure
Java Example - Traverse all directories under the specified directory
Java Example - Traverse all files under the specified directory
Java Example - Find files in the specified directory
Java Example - Traverse the system root directory
Java Example - View the current Working Directory
Java Example - Traversing Directory
##Java Exception Handling
- Java Example-Exception handling method
- Java Example-Multiple exception handling (multiple catches)
- Java Example-Usage of Finally
- Java Example-Use catch to handle exceptions
- Java Example-Multi-threaded exception handling
- Java Example- Get exception stack information
- Java instance - overloaded method exception handling
- Java instance - chain test exception
- Java Example – Custom Exception
Java Data Structure
- Java Example – Number Sum Operation
- Java Example – Convert infix expression to suffix using stack
- Java Example – At the beginning and end of LinkedList
- Java instance – Get the first element of the linked list (LinkedList)
- Java instance – Delete the element in the linked list
Java Example – Get the elements of the linked list
Java Example – Get the index value of the vector element
Java Example – implementation of stack
Java example – search for linked list elements
Java example – method of pushing and popping the stack to implement string reversal
Java Example – Queue Usage
Java Example – Get the Maximum Element of a Vector
Java Example – Linked List Modification
Java Example – Rotation Vector
Java Collection
Java Example – Convert Array to Set
Java Example – Set Comparison
Java Example – HashMap Traversal
Java Example – Collection Length
Java Example – Collection Shuffle Order
Java Example – Collection Traversal
Java Example – Reverse Collection
Java Example – Delete the specified element in the collection
Java Example – Read Only Collection
Java Example – Collection Output
Java Example – Collection to Array
Java Example – List loop moves elements
Java example – Find the maximum and minimum value in List
Java example – Traverse the key values of HashTable
Java Example – Use Enumeration to traverse HashTable
Java Example – Add different types of elements to the collection
Java Example – List element replacement
Java example – List interception
Java network example
Java instance – Get the IP address of the specified host
Java instance – Check whether the port is already in use
Java instance – Get the local ip Address and host name
Java instance – Get remote file size
- ##Java instance – Socket implements multi-threaded server program
- Java Example – View the last modification time of the specified file on the host
- Java Example – Use Socket to connect to the specified host
- Java Example – Web scraping
- Java Example – Obtain the date information of the URL response header
- Java Example – Obtain the URL response header information
- Java instance – parsing URL
- Java instance – ServerSocket and Socket communication instance
Java Thread
- Java Instance – Check whether the thread is alive
- Java Instance – Get the current thread name
- Java instance – status monitoring
- Java instance – thread priority setting
- Java instance – deadlock and solution
- Java instance – Get thread id
- Java instance – Thread hangs
- Java instance – Terminate thread
- Java Instance – Producer/Consumer Issue
- Java Instance – Get Current Thread Name
- Java Instance – Status Monitoring
- Java Instance – Thread Priority Setting
Java Example – Deadlock and Solution
Java Example – Obtain Thread Status
Java Example – Get all threads
Java instance – view thread priority
Java instance – interrupt thread