Quantcast
Channel: Tech Tutorials
Browsing all 862 articles
Browse latest View live

pass Statement in Python

In this tutorial you'll learn about pass statement in Python which acts as a placeholder.Python pass statementpass statement is a null operation, when it is executed, nothing happens. It is useful as a...

View Article


break Statement in Java

In this tutorial you’ll learn about break statement in Java. When you are working with loops where loop body is repeatedly executed, you may have a scenario where you want to skip the execution of...

View Article


continue Statement in Java

When you are working with loops where loop body is repeatedly executed, you may have a scenario where you want to skip the execution of statements inside the loop or you may want to terminate the loop...

View Article

return Statement in Java

In previous tutorials we have already seen continue statement which is used to continue the iteration of a loop and break statement which is used to break out of a loop, in this post we’ll learn about...

View Article

Image may be NSFW.
Clik here to view.

First Java Program - Hello World Java Program

In this Java tutorial we’ll see how to write your first Java program- A Hello World Java program. A “Hello World” program is just a simple program to display “Hello World” on the screen. Since focus is...

View Article


Python break Statement With Examples

In this tutorial you’ll learn about break statement in Python which is used inside a for loop or while loop to terminate the loop when break statement is executed. When break statement is encountered...

View Article

Python continue Statement With Examples

In this tutorial you’ll learn about continue statement in Python which is used inside a for loop or while loop to go back to the beginning of the loop. When continue statement is encountered in a loop...

View Article

Python assert Statement

In this tutorial you’ll learn about assert statement in Python which is used to assert the trueness of a condition.Assertion is a boolean expressions to check if the condition is true or false. In case...

View Article


What if run() Method Called Directly Instead of start() Method - Java...

When we call start() method on the thread it causes the thread state to change to "Runnable". It’s the Java Virtual Machine that calls the run method of that thread to actually start the thread...

View Article


Java ThreadLocal Class With Examples

Usually when there are multiple threads sharing an object we need to synchronize the critical section of the code in order to make it thread safe. ThreadLocal class in Java provides another way of...

View Article

Python return Statement With Examples

In this tutorial you’ll learn about return statement in Python which is used to exit a function and return a value.Note that returning a return result from a function is not mandatory, return is not...

View Article

Constructor in Java

In Java there is a special method provided to initialize objects when they are created. This special method which helps in automatic initialization is called Constructor in Java.Java...

View Article

Dependency Injection Using factory-method in Spring

In Spring framework beans are by default singleton in scope with in the Spring container. Now if you have a Singleton Java class, or a factory class with a static method how will you ensure that only...

View Article


Image may be NSFW.
Clik here to view.

Creating PDF in Java Using Apache PDFBox

In the post Creating PDF in Java Using iText we have already seen how to use iText library to generate a PDF in Java, we have already seen one alternative of iText which is OpenPDF for generating PDF....

View Article

Image may be NSFW.
Clik here to view.

Strings in Python With Method Examples

String which represents a sequence of characters is one of the most used type in most of the applications. So programming languages generally ensure that String is well optimized and has an extensive...

View Article


Functional Interfaces in Java

A functional interface in Java is an interface with only one abstract method. A functional interface is also known as SAM type where SAM stands for (Single Abstract Method). An example of functional...

View Article

Image may be NSFW.
Clik here to view.

String Slicing in Python

String in Python is stored as an array so array indexing can be used to access characters of a String, for example str[0] returns first character of the String str. You may have a scenario where you...

View Article


String Length in Python - len() Function

To find length of String in Python you can use len() function.Syntax of len() functionlen(str)Where str is the String parameter. This function returns the length of the passed String as an integer,...

View Article

Check if String Present in Another String in Python

In Python if you want to check if a given String is present in another String then you have following options-Use Python membership operators ‘in’ and ‘not in’. See example.Using find() method to check...

View Article

Image may be NSFW.
Clik here to view.

Creating Tar File And GZipping Multiple Files - Java Program

If you want to GZIP multiple files that can’t be done directly as you can only compress a single file using GZIP. In order to GZIP multiple files you will have to archive multiple files into a tar and...

View Article
Browsing all 862 articles
Browse latest View live