This document provides an overview of key concepts in Java programming including:
- Comments can be added using //, /* */, or /** */.
- Java has primitive data types like int, double, boolean and reference types like String.
- Variables are declared with a type and initialized through assignment.
- Operators perform tasks like arithmetic, comparison, and assignment.
- Control flow is managed through conditionals like if/else and loops like for.
- Arrays store multiple values of the same type and can be one or multi-dimensional.
Static variables scope remains within the whole program. IT is not reinitialised again and again. We can declare the members of a class as static as well. Both possess same properties.
Our Facebook page:
https://www.facebook.com/programming.cplusplus/
Static variables scope remains within the whole program. IT is not reinitialised again and again. We can declare the members of a class as static as well. Both possess same properties.
Our Facebook page:
https://www.facebook.com/programming.cplusplus/
Super keyword is a reference variable that is used for refer parent class object. Super keyword is used in java at three level, at variable level, at method level and at constructor level.
Basic java important interview questions and answers to secure a jobGaruda Trainings
P2Cinfotech is one of the leading, Online IT Training facilities and Job Consultant, spread all over the world. We have successfully conducted online classes on various Software Technologies that are currently in Demand. To name a few, we provide quality online training for QA, QTP, Manual Testing, HP LoadRunner, BA, Java Technologies, SEO, Web Technologies, .NET, Oracle DBA etc.
This presentation discusses about the following topics:
Physical Database Design Phase
Steps in Physical Database Design
Files and Records
Index Classification
Hash-Based Indexes
Tree Indexes
B+ Tree
Ordered Indexes
Primary Indexes
Clustering Indexes
Secondary Indexes
Indexed Sequential
In this core java training session, you will learn OOP with Java Contd. Topics covered in this session are:
• Review of last class concepts
• Types of Inheritance and a look at Aggregation
• Polymorphism
• Method overloading
• Method overriding
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Super keyword is a reference variable that is used for refer parent class object. Super keyword is used in java at three level, at variable level, at method level and at constructor level.
Basic java important interview questions and answers to secure a jobGaruda Trainings
P2Cinfotech is one of the leading, Online IT Training facilities and Job Consultant, spread all over the world. We have successfully conducted online classes on various Software Technologies that are currently in Demand. To name a few, we provide quality online training for QA, QTP, Manual Testing, HP LoadRunner, BA, Java Technologies, SEO, Web Technologies, .NET, Oracle DBA etc.
This presentation discusses about the following topics:
Physical Database Design Phase
Steps in Physical Database Design
Files and Records
Index Classification
Hash-Based Indexes
Tree Indexes
B+ Tree
Ordered Indexes
Primary Indexes
Clustering Indexes
Secondary Indexes
Indexed Sequential
In this core java training session, you will learn OOP with Java Contd. Topics covered in this session are:
• Review of last class concepts
• Types of Inheritance and a look at Aggregation
• Polymorphism
• Method overloading
• Method overriding
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
it covers the following topics:
Java Evolution
Overview
Constants, variables & data types
Operators and expressions
Decision making and branching
Decision making and looping
Classes, objects & methods
Arrays, Strings and Vectors
Interface
Packages
Multi-threading
Managing errors and exceptions
Applet programming
Every value in Java has a data type. Java supports two kinds of data types: primitive data types and reference data types. Primitive data types represent atomic, indivisible values. Java has eight Numeric data types: byte, short, int,
An operator is a symbol that is used to perform some type of computation on its operands. Java contains a rich set of
operators. Operators are categorized as unary, binary, or ternary based on the number of operands they take. They are categorized as arithmetic, relational, logical, etc. based on the operation they perform on their operands.
long, float, double, char, and boolean. Literals of primitive data types are constants. Reference data types represent
references of objects in memory. Java is a statically typed programming language. That is, it checks the data types of all values at compile time.
#LibreOffice is a #free and powerful #officesuite, and a successor to #OpenOffice.org (commonly known as #OpenOffice).
Its clean interface and feature-rich tools help you unleash your #creativity and enhance your #productivity. #LibreOffice includes several applications that make it the most versatile #Free and #OpenSource office suite on the market: #Writer (#wordprocessing), Calc (#spreadsheets), Impress (presentations), #Draw (vector graphics and #flowcharts), Base (#databases), and #Math (#formula editing).
#LibreOffice is #community-driven and #developed #software, and is a project of the #nonprofit #organization, The #Document #Foundation. #LibreOffice is free and #opensource software, originally based on #OpenOffice.org (commonly known as OpenOffice), and is the most actively developed OpenOffice.org successor project.
#LibreOffice is developed by users who, just like you, believe in the principles of #FreeSoftware and in sharing their work with the world in non-restrictive ways.
This office suite can easily replace costly paid option available. If you need a good office suite which is easily and freely available you can for sure give a try and.
It has following features/components for making your work easy and cost free and vendor independent:
Writer – word processor
Calc – spreadsheet
Impress – presentations
Draw – diagrams
Base – database
Math – formula editor
Charts
Better #collaboration
#Sharingdocuments and edits with other users have been enhanced and well tracked, to make modifications more clear.
Work faster in Calc
Working with #Spreadsheet has the new #Bash-like autocompletion feature helps you to input data in a snap.
#Barcodes and borders
We can now insert #barcodes into your #documents with just a few clicks
For Full information about the release you can visit if your are interested.
https://wiki.documentfoundation.org/ReleaseNotes/7.3
If you need any help you can reach out here
https://twitter.com/libreoffice
https://blog.documentfoundation.org/
https://www.facebook.com/libreoffice.org
https://twitter.com/AskLibreOffice
What Next :
#LibreOffice 7.4 – is next major release in August, you can try installing and test it and help the developers to find if any bug or issue or need any improvement.
Let's install and explore.
We will now install it in #Ubuntu and explore this a bit
#SystemArchitecture Series: #Kerberos Architecture Component and communication flow #architecture
#Kerberos is a ticketing-based #authentication #system, based on the use of #symmetric keys. #Kerberos uses tickets to provide #authentication to resources instead of #passwords. This eliminates the threat of #password stealing via #networksniffing. One of the biggest benefits of #Kerberos is its ability to provide single sign-on (#SSO). Once you log into your #Kerberos environment, you will be automatically logged into other applications in the environment.
To help provide a secure environment, #Kerberos makes use of Mutual #Authentication. In Mutual #Authentication, both the #server and the #client must be authenticated. The client knows that the server can be trusted, and the server knows that the client can be trusted. This #authentication helps prevent man-in-the-middle attacks and #spoofing. #Kerberos is also time sensitive. The tickets in a #Kerberosenvironment must be renewed periodically or they will expire.
2. Contents
• A Simple Java Program
• Comments
• Data Types
• Variables
• Assignments and Initializations
• Operators
• Strings
• Control Flow
• Big Numbers
• Arrays
3. A Simple Java Program
public class FirstSample
{
public static void main(String[] args)
{
System.out.println("We will not use 'Hello, World!'");
}
}
•Java is case sensitive.
•The keyword public is called an access
modifier.
•Everything in a Java program must be
inside a class.
4. Comments
Comments in Java, like comments in most
programming languages, do not show up in the
executable program.
Java has three ways of showing comments.
1. The most common method is a //.
2. When longer comments are needed, you can use
the /* and */ comment delimiters that let you block
off a longer comment.
3. Finally, there is a third kind of comment that
can be used to generate documentation
automatically. This comment uses a /** to start and
a */ to end.
5. Data Types
Java is a strongly typed language.
There are eight primitive types in Java.
• Four of them are integer types;
• Two are floating-point number types;
• One is the character type char,
• One is a boolean type for truth values.
6. Integers
The integer types are for numbers without
fractional parts.
Type Storage
Requirement
Range (inclusive)
int 4 bytes
–2,147,483,648 to 2,147,483,
647 (just over 2 billion)
short 2 bytes –32,768 to 32,767
long 8 bytes
–9,223,372,036,854,775,808L
to 9,223,372,036,854,775,807L
byte 1 byte –128 to 127
7. Floating-Point Types
The floating-point types denote numbers with
fractional parts.
Type
Storage
Requirement Range
float 4 bytes
approximately ±3.40282347E+38F (6–7
significant decimal digits)
double 8 bytes
approximately
±1.79769313486231570E+308 (15
significant decimal digits)
8. The Character Type
Single quotes are used to denote char constants.
The char type denotes characters in the
Unicode encoding scheme.
Special characters
Escape Sequence Name Unicode Value
b backspace u0008
t tab u0009
n linefeed u000a
r carriage return u000d
" double quote u0022
' single quote u0027
backslash u005c
The Boolean Type
The boolean type has two values, false and true.
It is used for evaluating logical conditions.
10. Assignments and Initializations
After you declare a variable, you must
explicitly initialize it by means of an
assignment statement.
You assign to a previously declared
variable using the variable name on the left,
an equal sign (=) and then some Java expression
that has an appropriate value on the right.
int vacationDays; // this is a declaration
vacationDays = 12; // this is an assignment
One nice feature of Java is the ability to both
declare and initialize a variable on the same line.
For example:
int vacationDays = 12; // this is an initialization
11. Operators
Operator Function
+ Addition
- Subtraction
* Multiplication
/ Division
% Integer remainder
There is a convenient shortcut for using
binary arithmetic operators in an assignment.
For example,
x += 4; is equivalent to x = x + 4;
Increment and Decrement Operators
x++ adds 1 to the current value of the variable x,
and x-- subtracts 1 from it. They cannot be applied to
numbers themselves.
12. int m = 7, n = 7;
int a = 2 * ++m;
int b = 2 * n++;
There are actually two forms of these operators;
you have seen the “postfix” form of the operator
that is placed after the operand. There is also a
“Prefix” form, ++n. Both change the value of the
variable by 1.
Relational and boolean Operators
Java has the full complement of relational operators.
To test for equality, a double equal sign, “ == ” is used.
A “ != ” is used for checking inequality.
< (less than), > (greater than), <= (less than or equal),
and >= (greater than or equal) operators.
13. && for the logical “and” operator
|| for the logical “or” operator
! is the logical negation operator.
Ternary operator, ?:
condition ? e1 : e2
Evaluates to e1 if the condition is true, to e2 otherwise.
Bitwise Operators
& ("and")
| ("or")
^ ("xor")
~ ("not")
>> right shift
<< left shift
14. Operator Purpose
+ addition of numbers, concatenation of Strings
+= add and assign numbers, concatenate and
assign Strings
- subtraction
-= subtract and assign
* multiplication
*= multiply and assign
/ division
/= divide and assign
% take remainder
%= take remainder and assign
++ increment by one
-- decrement by one
15. Operator Purpose
> greater than
>= greater than or equal to
< less than
<= less than or equal to
! boolean NOT
!= not equal to
&& boolean AND
|| boolean OR
== boolean equals
= assignment
~ bitwise NOT
?: conditional
16. Operator Purpose
| bitwise OR
|= bitwise OR and assign
^ bitwise XOR
^= bitwise XOR and assign
& bitwise AND
&= bitwise AND and assign
>> shift bits right with sign extension
>>= shift bits right with sign extension
and assign
<< shift bits left
<<= shift bits left and assign
>>> unsigned bit shift right
>>>= unsigned bit shift right and assign
17. Strings
Strings are sequences of characters, such as "Hello".
Java does not have a built-in string type. Instead, the
standard Java library contains a predefined class called,
String.
String e = ""; // an empty string
String greeting = "Hello";
Concatenation
String expletive = "Expletive";
String PG13 = "deleted";
String message = expletive + PG13;
Substrings
String greeting = "Hello";
String s = greeting.substring(0, 4);
18. Control Flow
Java, like any programming language, supports both
conditional statements and loops to determine control flow.
The Java control flow constructs are identical to those in
C and C++, with some exceptions. There is no goto, but
there is a “labeled” version of break that you can use to
break out of a nested loop
Conditional Statements
if
if- else
while
do… while
for
switch
19. Big Numbers
If the precision of the basic integer and
floating-point types is not sufficient, you can turn to a
couple of handy classes in the java.math package, called
BigInteger and BigDecimal.
These are classes for manipulating numbers with an
arbitrarily long sequence of digits.
Use the static valueOf method to turn an ordinary
number into a big number:
BigInteger a = BigInteger.valueOf(100);
You cannot use the familiar mathematical operators such
as + and * to combine big numbers. Instead, you must use
methods such as add and multiply in the big number classes.
BigInteger c = a.add(b); // c = a + b
BigInteger d = c.multiply(b.add(BigInteger.valueOf(2)));
// d = c * (b + 2)
20. Arrays
An array is a data structure that stores a collection of
values of the same type.
You access each individual value through an
integer index.
Declaration of an array a of integers:
int[] a; or int a[];
However, this statement only declares the variable a.
It does not yet initialize a with an actual array. You use
the new operator to create the array.
int[] a = new int[100];
Java has a shorthand to create an array object and supply
initial values at the same time.
int[] smallPrimes = { 2, 3, 5, 7, 11, 13 };
21. Sorting an Array
If you want to sort an array of numbers, you can
use one of the sort methods in the Arrays class:
int[] a = new int[10000];
. . .
Arrays.sort(a)
This method uses a tuned version of the QuickSort
algorithm that is claimed to be very efficient on
most data sets.
Multidimensional Arrays
Multidimensional arrays use more than one index
to access array elements. They are used for tables and other
more complex arrangements.
22. Declaring a matrix in Java is simple enough.
For example:
double[][] balance;
The initialization as follows:
balance = new double[NYEARS][NRATES];
A shorthand notion for initializing multidimensional arrays
without needing a call to new.
For example;
int[][] magicSquare =
{
{16, 3, 2, 13},
{5, 10, 11, 8},
{9, 6, 7, 12},
{4, 15, 14, 1}
};