-
public static void main(String[] args) – Java main method
In Java programs, the point from where the program starts its execution or simply the entry point of Java programs is the main() method. Why is the main method so important? The Java compiler or JVM looks for the main method when it starts executing a Java program. The signature of the main method needs to be in a specific…
-
oops scenario programs
Scenario #1: Expected Understanding: Access Modifiers, Single Inheritance, getter methods, Constructor Overloading 1) Create a Class named “Trainer” with main method. – Have default instance variables String dept, institute – Assign values – “Java”, “Payilagam” to them – Have private instance variable int salary – Assign 10000 as value for salary. – Create getter method…
-
sql (day2)
create database: example: create database students; Rename database: example: alter database “students” rename to “school”; Create database using primary key: example: create database students(s_id serial primary key,name varchar(20) not null); Add column: example: alter table students add column department varchar(20); Insert table: There are two types to insert table.There are: Type 1: example: insert into…
-
System.out.println() in Java
What Is System Out Println in Java? To define System.out.println() in Java, it is a simple statement that prints any argument you pass and adds a new line after it. (System.out.println is a Java statement that prints the argument passed, into the System.out which is generally stdout. System is a class in the java.lang package . The out is…
-
Array and it types
Array: An array in Java is a group of like-typed variables referred to by a common name.To declare an array, define the variable type with square brackets . Following are some important points about Java arrays. An array can contain primitives (int, char, etc.) and object (or non-primitive) references of a class depending on the definition of…
-
Flowchart
1.Palindrome: 2.Addiion of digits: 3.Count of digits: 4.Armstrong: 5.Decimal to binary: 6.Binary to decimal: 7.Prime number: 8.Least common multiple: 9.Greatest common divisor: 10.Fibonacci series: