☕
TechLearn
Java Tutorial
Back to Home
What is Java?Features of JavaUses of JavaJava Editions (Java SE, EE, ME)JDK, JRE and JVMJava ArchitecturePlatform IndependenceBytecodeHow Java WorksFirst Java ProgramJava Compilation ProcessJava Execution FlowJava InstallationSetting JAVA_HOMEJava Environment SetupJava Naming ConventionsJava KeywordsJava Reserved WordsJava IdentifiersJava Unicode SystemJava CommentsJava Coding Standards
Variables in JavaData Types in JavaPrimitive Data TypesNon-Primitive Data TypesLiteralsType CastingWidening CastingNarrowing CastingOperatorsArithmetic OperatorsRelational OperatorsLogical OperatorsBitwise OperatorsAssignment OperatorsUnary OperatorsTernary Operatorinstanceof OperatorInput and OutputScanner ClassBufferedReaderConsole Inputprintf()Escape SequencesCommand Line Arguments
Control Statementsif Statementif-else StatementNested ifswitch Statementswitch Expressionfor Loopwhile Loopdo-while LoopEnhanced for Loopbreak Statementcontinue Statementreturn Statement
OOP ConceptsClassesObjectsObject CreationDefault ConstructorParameterized ConstructorConstructor OverloadingCopy Constructorthis Keywordstatic Keywordfinal KeywordAccess ModifiersEncapsulationSingle InheritanceMultilevel InheritanceHierarchical InheritanceMethod Overridingsuper KeywordCompile-time PolymorphismRuntime PolymorphismAbstractionAbstract ClassInterfaceMultiple Inheritance using InterfaceAssociationAggregationCompositionObject ClassAnonymous ObjectInitialization BlocksNested ClassesInner ClassesAnonymous Inner ClassesStatic Nested Classes
Array BasicsOne-Dimensional ArrayTwo-Dimensional ArrayMultidimensional ArrayJagged ArrayArray InitializationArray TraversalArray SortingArray SearchingArrays ClassCopying ArraysPassing Arrays to MethodsReturning Arraysvarargs
String ClassString PoolImmutable StringMutable StringString MethodsString Comparisonequals() vs ==StringBufferStringBuilderStringTokenizerStringJoinerText BlocksUnicode HandlingRegular ExpressionsPattern ClassMatcher Class
Exception Basicstry-catchMultiple catchfinallythrowthrowsCustom ExceptionChecked ExceptionUnchecked ExceptionError vs ExceptionStack Tracetry-with-resourcesException PropagationChained Exceptions
Package ConceptBuilt-in PackagesUser-defined PackagesimportStatic ImportPackage ProtectionJAR FilesManifest File
Stack MemoryHeap MemoryMetaspaceJVM Memory ModelGarbage CollectionGC AlgorithmsMemory Leakfinalize()Reference Types (Weak, Soft, Phantom)
Collections OverviewIterableCollection InterfaceArrayListLinkedListVectorStackQueue InterfacePriorityQueueDequeArrayDequeHashSetLinkedHashSetTreeSetSortedSetNavigableSetHashMapLinkedHashMapTreeMapHashtableConcurrentHashMapWeakHashMapIdentityHashMapEnumMapCollections ClassComparableComparatorIteratorListIteratorSpliteratorFail-Fast vs Fail-SafeImmutable CollectionsSynchronized Collections
Generic ClassGeneric MethodType ParametersBounded TypesWildcardsUpper BoundLower BoundType ErasureGeneric InterfaceRaw Types
Process vs ThreadThread BasicsCreating ThreadsThread LifecycleThread PriorityThread SchedulerSynchronizationsynchronized KeywordInter-thread Communicationwait()notify()notifyAll()DeadlockRace ConditionStarvationThread SafetyvolatileAtomic VariablesExecutors FrameworkThread PoolFutureCompletableFutureForkJoinPoolLocks APIReentrantLockReadWriteLockSemaphoreCountDownLatchCyclicBarrierPhaserParallel StreamsVirtual Threads
I/O BasicsByte StreamsCharacter StreamsFile HandlingFile ClassFileInputStreamFileOutputStreamBuffered StreamsFileReaderFileWriterBufferedReaderBufferedWriterPrintWriterDataInputStreamDataOutputStreamSerializationDeserializationtransientExternalization
NIO OverviewPathFiles ClassChannelsBuffersWatchService
Lambda ExpressionsFunctional InterfacesPredicateFunctionConsumerSupplierMethod ReferencesStream APIIntermediate OperationsTerminal OperationsOptionalDefault MethodsStatic Interface MethodsDate Time APIBase64Parallel Streams
Module System (JPMS)JShellCollection Factory MethodsPrivate Interface Methodsvar KeywordHTTP Client APIString ImprovementsSwitch ExpressionsText BlocksPattern MatchingRecordsSealed ClassesPattern Matching for switchRecord PatternsSequenced CollectionsVirtual ThreadsStructured ConcurrencyScoped Values
Functional Programming BasicsPure FunctionsHigher Order FunctionsClosuresCurryingImmutable ProgrammingStream Pipelines
LocalDateLocalTimeLocalDateTimeZonedDateTimePeriodDurationDateTimeFormatterTime ZonesLegacy Date APICalendar
JDBC ArchitectureJDBC DriversDriverManagerConnectionStatementPreparedStatementCallableStatementResultSetTransactionsBatch ProcessingConnection PoolingMetadataRowSetStored Procedures
319 topics covered
☕
TechLearn
Java Tutorial
Back to Home
What is Java?Features of JavaUses of JavaJava Editions (Java SE, EE, ME)JDK, JRE and JVMJava ArchitecturePlatform IndependenceBytecodeHow Java WorksFirst Java ProgramJava Compilation ProcessJava Execution FlowJava InstallationSetting JAVA_HOMEJava Environment SetupJava Naming ConventionsJava KeywordsJava Reserved WordsJava IdentifiersJava Unicode SystemJava CommentsJava Coding Standards
Variables in JavaData Types in JavaPrimitive Data TypesNon-Primitive Data TypesLiteralsType CastingWidening CastingNarrowing CastingOperatorsArithmetic OperatorsRelational OperatorsLogical OperatorsBitwise OperatorsAssignment OperatorsUnary OperatorsTernary Operatorinstanceof OperatorInput and OutputScanner ClassBufferedReaderConsole Inputprintf()Escape SequencesCommand Line Arguments
Control Statementsif Statementif-else StatementNested ifswitch Statementswitch Expressionfor Loopwhile Loopdo-while LoopEnhanced for Loopbreak Statementcontinue Statementreturn Statement
OOP ConceptsClassesObjectsObject CreationDefault ConstructorParameterized ConstructorConstructor OverloadingCopy Constructorthis Keywordstatic Keywordfinal KeywordAccess ModifiersEncapsulationSingle InheritanceMultilevel InheritanceHierarchical InheritanceMethod Overridingsuper KeywordCompile-time PolymorphismRuntime PolymorphismAbstractionAbstract ClassInterfaceMultiple Inheritance using InterfaceAssociationAggregationCompositionObject ClassAnonymous ObjectInitialization BlocksNested ClassesInner ClassesAnonymous Inner ClassesStatic Nested Classes
Array BasicsOne-Dimensional ArrayTwo-Dimensional ArrayMultidimensional ArrayJagged ArrayArray InitializationArray TraversalArray SortingArray SearchingArrays ClassCopying ArraysPassing Arrays to MethodsReturning Arraysvarargs
String ClassString PoolImmutable StringMutable StringString MethodsString Comparisonequals() vs ==StringBufferStringBuilderStringTokenizerStringJoinerText BlocksUnicode HandlingRegular ExpressionsPattern ClassMatcher Class
Exception Basicstry-catchMultiple catchfinallythrowthrowsCustom ExceptionChecked ExceptionUnchecked ExceptionError vs ExceptionStack Tracetry-with-resourcesException PropagationChained Exceptions
Package ConceptBuilt-in PackagesUser-defined PackagesimportStatic ImportPackage ProtectionJAR FilesManifest File
Stack MemoryHeap MemoryMetaspaceJVM Memory ModelGarbage CollectionGC AlgorithmsMemory Leakfinalize()Reference Types (Weak, Soft, Phantom)
Collections OverviewIterableCollection InterfaceArrayListLinkedListVectorStackQueue InterfacePriorityQueueDequeArrayDequeHashSetLinkedHashSetTreeSetSortedSetNavigableSetHashMapLinkedHashMapTreeMapHashtableConcurrentHashMapWeakHashMapIdentityHashMapEnumMapCollections ClassComparableComparatorIteratorListIteratorSpliteratorFail-Fast vs Fail-SafeImmutable CollectionsSynchronized Collections
Generic ClassGeneric MethodType ParametersBounded TypesWildcardsUpper BoundLower BoundType ErasureGeneric InterfaceRaw Types
Process vs ThreadThread BasicsCreating ThreadsThread LifecycleThread PriorityThread SchedulerSynchronizationsynchronized KeywordInter-thread Communicationwait()notify()notifyAll()DeadlockRace ConditionStarvationThread SafetyvolatileAtomic VariablesExecutors FrameworkThread PoolFutureCompletableFutureForkJoinPoolLocks APIReentrantLockReadWriteLockSemaphoreCountDownLatchCyclicBarrierPhaserParallel StreamsVirtual Threads
I/O BasicsByte StreamsCharacter StreamsFile HandlingFile ClassFileInputStreamFileOutputStreamBuffered StreamsFileReaderFileWriterBufferedReaderBufferedWriterPrintWriterDataInputStreamDataOutputStreamSerializationDeserializationtransientExternalization
NIO OverviewPathFiles ClassChannelsBuffersWatchService
Lambda ExpressionsFunctional InterfacesPredicateFunctionConsumerSupplierMethod ReferencesStream APIIntermediate OperationsTerminal OperationsOptionalDefault MethodsStatic Interface MethodsDate Time APIBase64Parallel Streams
Module System (JPMS)JShellCollection Factory MethodsPrivate Interface Methodsvar KeywordHTTP Client APIString ImprovementsSwitch ExpressionsText BlocksPattern MatchingRecordsSealed ClassesPattern Matching for switchRecord PatternsSequenced CollectionsVirtual ThreadsStructured ConcurrencyScoped Values
Functional Programming BasicsPure FunctionsHigher Order FunctionsClosuresCurryingImmutable ProgrammingStream Pipelines
LocalDateLocalTimeLocalDateTimeZonedDateTimePeriodDurationDateTimeFormatterTime ZonesLegacy Date APICalendar
JDBC ArchitectureJDBC DriversDriverManagerConnectionStatementPreparedStatementCallableStatementResultSetTransactionsBatch ProcessingConnection PoolingMetadataRowSetStored Procedures
319 topics covered
Home/Java/Java NIO
☕ Java

Java NIO

6 lessons in this section of the Java tutorial. Work through them in order, or jump to the one you need.

  1. 1.NIO Overview

    Java NIO (New I/O), introduced in Java 1.4 as the java.nio package, is a collection of APIs that complement and in many cases supersede the original java.io stream model.

  2. 2.Path

    Path is the central interface in java.nio.file, introduced in Java 7 as part of NIO.2, representing a location in a file system as a sequence of path elements separated…

  3. 3.Files Class

    java.nio.file.Files is a utility class introduced in Java 7 containing over 70 static methods that perform all file system operations on Path objects: reading and…

  4. 4.Channels

    A channel in Java NIO is an open connection to an I/O entity — a file, a socket, a pipe — that can be read from, written to, or both.

  5. 5.Buffers

    A Buffer in Java NIO is a fixed-capacity, typed container for data that serves as the intermediary between application code and channels.

  6. 6.WatchService

    WatchService is a Java NIO.2 API introduced in Java 7 that monitors file system directories for changes using OS-level event notification rather than polling.

← Java I/OJava 8 Features →
TechLearn

Free Java and Spring Boot tutorials for developers, written by Ajeet Kumar.

Tutorials

  • Java Tutorial
  • Spring Boot Tutorial

About & Legal

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Disclaimer

© 2026 TechLearn. All rights reserved.