Modi Coders

Modi Coders

  • Instagram
  • Facebook
  • Twitter
  • Blog
  • Contact
  • Different types of tokens in java

    September 9, 2024
    Java

    In Java, tokens are the smallest units of code that have meaning in the language. They are the building blocks of Java programs and can be categorized into several types: 1. Keywords Keywords are reserved words in Java that have special meanings in the language. They cannot be used as identifiers (names for variables, methods,…

  • Different types of functions in java

    September 5, 2024
    Java

    public class A { static int print(int a) { System.out.println(“I am print function”); return 10; } static void print2() { System.out.println(“I am print function2”); } static void print3(int a) { System.out.println(“I am print function3”); //return 10; } static int print4() { System.out.println(“I am print function4”); return 10; } public static void main(String[] args) { int…

  • write a java program to show usage of different types of operators in java without using functions

    September 5, 2024
    Uncategorized

    public class OperatorDemo { public static void main(String[] args) { // Variable Declaration int a = 10; int b = 5; boolean result; // Arithmetic Operators int sum = a + b; int difference = a – b; int product = a * b; int quotient = a / b; int remainder = a %…

  • Different types of inheritance in java?

    August 13, 2024
    Java

    Inheritance is a fundamental concept in object-oriented programming (OOP) that allows one class to inherit the properties and behaviors (fields and methods) of another class. In Java, there are several types of inheritance, each serving a different purpose: 1. **Single Inheritance**: In single inheritance, a class (the subclass or derived class) inherits from only one…

  • What are tokens in Java?

    August 13, 2024
    Java

    In Java, tokens are the smallest units of a program that have a meaning. They are the building blocks of the Java programming language. When you write Java code, the compiler breaks it down into these tokens for further analysis and processing. The main types of tokens in Java are: Keywords: These are reserved words…

  • Define encapsulation in java

    August 7, 2024
    Java

    Encapsulation is one of the fundamental concepts of object-oriented programming (OOP) in Java. It is the technique of bundling the data (variables) and the methods (functions) that operate on the data into a single unit, called a class. Encapsulation is used to hide the internal state of an object from the outside world and only…

  • Java Handwritten Notes

    August 7, 2024
    Java

    Java Notes   java5 java4 java3 java1

  • Java Interview Questions

    August 7, 2024
    Java

    Download PDF java 7

  • In Java Create a package containing a class to print your (name, roll no, marks) and use this package in another program using import statement.

    August 2, 2024
    Java

    src/ └── studentinfo/          └── Student.java └── Main.java   package studentinfo; public class Student { private String name; private int rollNo; private double marks; // Constructor public Student(String name, int rollNo, double marks) { this.name = name; this.rollNo = rollNo; this.marks = marks; } // Method to print student details public void printDetails() { System.out.println(“Name: ”…

  • Demonstrate the use of static and non static nested classes.

    August 2, 2024
    Java

    public class OuterClass { private static String staticMessage = “Static message from OuterClass”; private String nonStaticMessage = “Non-static message from OuterClass”; // Static nested class static class StaticNestedClass { void display() { // Accessing static member of OuterClass System.out.println(“Accessing from StaticNestedClass: ” + staticMessage); // Cannot access non-static members of OuterClass // System.out.println(“Non-static message: ”…

Previous Page
1 … 5 6 7 8 9
Next Page
  • Instagram
  • Facebook
  • Twitter

Modi Coders