KnpCode
Java, Spring, BigData, Web development tutorials with examples
 
Skip to content
  • Ubuntu
  • Big Data
    • Hadoop Tutorials
  • Java
    • Core Java Tutorials – Beginner
    • Core Java Tutorials – Advanced
    • Java Programs
  • spring
    • Spring Framework
Home Articles posted by UshaK (Page 2)

Author: UshaK

Check if Given String Subsequence of Another String in Java

UshaK February 11, 2021 February 15, 2021java-programs java-programs 0

Write a Java program to check if given String is subsequence of another string is asked quite often in Java interviews. If you have two strings str1 and str2 then str1 is a subsequence of str2 if all the characters in str1 are found in str2, characters may not be…

Continue reading

Java Program to Check if Armstrong Number

UshaK February 11, 2021 February 15, 2021java-programs java-programs 0

In this post we’ll see a Java program to check if the passed number is an Armstrong number or not. A number is an Armstrong number if it is equal to the number you get by raising every digit of the number to the power of count of digits in…

Continue reading

How to Reverse a String in Java

UshaK February 10, 2021 February 15, 2021java-programs java-programs 0

In this post we’ll see how to reverse a string in Java. Though StringBuffer and StringBuilder classes in Java have a reverse() method that can be used to reverse a String but you may be asked to write your own logic to reverse a String. In that case too you…

Continue reading

Python Classes and Objects

UshaK February 10, 2021 February 10, 2021python Python, Python class object 0

In this tutorial you will learn how to define a class in Python and how to create an object of a class in Python. Table of contents Class in Python Python class example Object in Python Python object creation example Class and instance variables Class in Python A class in…

Continue reading

Abstract Class in Python With Examples

UshaK February 8, 2021 February 9, 2021python Python, Python class object 0

In this tutorial you will learn about Abstract class which is an important concept in object oriented programming and how to define abstract classes in Python using abc module. Table of contents What is an Abstract class Creating Abstract class in Python Abstract method in Python Why use an Abstract…

Continue reading

How to Copy File in Python

UshaK February 4, 2021 February 4, 2021python Python, Python IO 0

In this post we’ll see different ways you can copy a file in Python. 1. A simple way to copy a file in Python is to use read() method to read a file once you have a file object and then write the content to another file. Following Python program…

Continue reading

issubclass() in Python With Examples

UshaK February 3, 2021 February 12, 2021python Python, Python functions 0

The Python issubclass() is a built-in function that checks whether the passed class is a subclass of the specified another class or not. Syntax of the Python issubclass() is as given below- issubclass(class, classinfo) Function returns True if class is a subclass (direct, indirect or virtual) of classinfo. classinfo may…

Continue reading

Method Overriding in Python With Examples

UshaK February 1, 2021 February 1, 2021python Python, Python OOPS 0

In this post we’’ll see how Method Overriding in Python works. What is Method Overriding Method overriding is an object oriented programming concept which states that a child class can provide a different implementation of a method that is already there in one of its parent classes. If a method…

Continue reading

Method Overloading in Python With Examples

UshaK February 1, 2021 February 1, 2021python Python, Python OOPS 0

In this post we’’ll see how Method Overloading in Python works. What is Method Overloading Method overloading is also an object oriented programming concept which states that in a single class you can have two or more methods having the same name where the methods differ in types or number…

Continue reading

Name Mangling in Python With Examples

UshaK January 29, 2021 February 5, 2021python Python, Python class object 0

If you are writing a class in Python and want to follow Encapsulation OOPS concept in Python then how will you stop outside access to the variables as there are no explicit access modifiers like public, private, protected in Python and all the variables are public by default. In Python…

Continue reading

‹1234›»
Privacy Policy | Disclaimer
Powered by Nirvana & WordPress.