Category: Programming

  • How to Create a Custom Store Categories Page in WordPress Without a Child Theme

    Learn how to create a custom store categories page in WordPress using a shortcode without modifying the parent theme. This guide walks you through fetching and displaying store categories, associating stores with categories, and ordering them alphabetically for better navigation.

  • Polymorphism in Java – OOP – Code Example

    In previous posts we have discussed many important topics of object oriented programming like classes, objects, inheritance etc. In this post we will discuss polymorphism in Java which is another important OOP concept. What is Polymorphism in Java? The word polymorphism means ‘a state of having many shapes’. In terms of object oriented programming it’s the…

  • IS-A and HAS-A Relationships in Java – Code Example

    Code reuse-ability is the fundamental objective of object oriented programming. To achieve code reuse-ability objective, we use IS-A, HAS-A relationships. IS-A relationship is another name of inheritance or we can say that IS-A relationship is achieved through inheritance. In inheritance child class can inherit attributes and methods from its parent class. For example we have…

  • Inheritance in Java OOP – Code Example 2

    In previous post we learned about inheritance in Java programming by using simple code example. In this post we will consider another code example of inheritance in Java. In previous post we created a Car class (child class) which inherited some attributes and methods from Vehicle class (parent class). In this post we will create…

  • Inheritance in Java OOP – Code Example 1

    In our previous post we learned how to create classes and objects by using code example. In this post we will learn inheritance which is another important object oriented programming (OOP) concept. Inheritance in Java is like a parent child relationship. As child inherit some properties or behaviors from parents, similarly in inheritance (OOP Concept) a…

  • Classes and Objects in Java Programming – Code Example

    In this post we will learn (java syntax) what are classes and objects in Java programming. Classes and objects are fundamental object oriented programming concepts. In previous post we discussed some important object oriented programming concepts. If you want to learn about classes and objects, class constructor method, constructor parameters, instance variables, class methods and…

  • Basic Data Types in Java Programming – Example Code

    In previous post we learned how to write a very simple hello world Java program. In this simple program we will explain what are some different data types in Java. We use specific data types to define variable depending upon the nature of data we want to store in variable. [js] public class DataTypesJava {…

  • Hello World Program in Java

    In this post we will discuss and explain how to write a simple hello world program in java. To write, compile and execute a java program many IDE’s are available but we will use netbeans  (www.netbeans.org). Following is the simple hello world program in java programming. Step 1: Open netbeans IDE, go into File and…

  • What is Object Oriented Programming?

    The ultimate goal of software development is to build a software quickly, correctly and economically. Object Oriented Programming design and implementation approach helps fulfill this goal more productively as compared with structured programming technique. Object oriented programs are often easier to understand, correct and modify. In object oriented programming we divide or organize our program…

  • Introduction To Java Programming

    There’s no doubt that java programming language is one of the most powerful programming languages out there in the world. Java is not just a programming language but a technology platform with many interconnected capabilities. According to official website, more than 15 billion devices run java. Which means that an application developed using java can…

  • Bubble Sort using Call by Reference (Pointers) C Program

    In one of our previous posts we already discussed about Bubble Sort algorithm and how to implement it in C programming. In this post we will discuss about bubble sort using call by reference method. In other words we will implement the bubble sort algorithm using pointers i.e call by reference. [js] #include <stdio.h> #define…

  • Constant Pointer vs Pointer to Constant C Program

    In previous post we discussed about pointers, how to define and use pointers. In this post we will learn what’s the difference between constant pointer and pointer to constant. If we define a pointer as constant then we cannot modify its memory address. For example if we assigned the memory address of a variable ‘a’…

  • Pointers in C Programming – Code Example

    In previous posts we concluded the arrays topic. In next 2-3 posts we will discuss about pointers with some code examples. Pointers are used to store memory address of variables or arrays. In following simple program we created a pointer named as countPtr and a variable named as count. Then we assigned the address of the…

  • Finding Mode Value From Array C Programming

    In previous posts we learned how to find mean value from array and median value from array. In this post we will learn how to find mode value from array elements. Mode value is the most repeated value from the elements. In following simple program we will create a function which will accept an array…

  • Finding Median Value From Array C Programming

    In previous post we learned how to write a C program to find mean value from array elements. In this post we will learn how to find median value from array elements. Median value is the centered value in sorted (ascending order) elements. We also learned in our previous post about how to sort array…

  • Finding Mean Value From Array C Programming

    In previous post we discussed about how to sort array elements using bubble sort function. In following simple program we will create a function which will accept an array as an input. Furthermore that function will return mean value of the array elements. Mean value is the average of all array elements. Mean value is calculated…

  • Sorting Array Elements Using Bubble Sort in C Programming

    In previous post we discussed about how to pass an array into function. In following simple program we will create a function which will accept an array as an input. We will pass an array as input to a function called bubblesort. That function will then sort the elements of the array in ascending order. [js]…

  • Passing Arrays into Functions

    In previous two posts we discussed about arrays and functions. In following simple program we will create a function which will accept an array as an input. Furthermore that function will multiply each element of the array with 20. At the and it outputs the elements of the array. It’s to be noted that when we…

  • Arrays in C Programming

    Arrays in C Programming: Array is a type of variable which can store multiple items of the same data type. In following simple program we will define an array of 10 elements. After that we will multiply each element of array with 5 and then we will output the value of each element of the…

  • Function Call by Value and Call by Reference in C Programming

    In this simple C code example we tried to show the difference between function call by value and call by reference in C programming. In function call by value the original variables are not affected because the values are copied inside function definitions. Whereas in function call by reference the original variables are affected because…