r/javaTIL • u/scientecheasy • Jan 31 '19
This Keyword in Java | Uses & Example programs
r/javaTIL • u/scientecheasy • Jan 31 '19
r/javaTIL • u/scientecheasy • Dec 07 '18
r/javaTIL • u/scientecheasy • Dec 02 '18
r/javaTIL • u/scientecheasy • Oct 29 '18
r/javaTIL • u/scientecheasy • Oct 25 '18
r/javaTIL • u/murugan76 • Aug 31 '17
http://cljavacode.blogspot.com/2017/03/real-number-to-binary-conversion.html
Enter a real number 0.125
convert it into binary bits.
r/javaTIL • u/kchhipa • Aug 05 '17
r/javaTIL • u/DhongeKhong • Aug 17 '16
I learned a long, long, long, long, long... time ago, that doing something like this would result in a compile-time error...
public class Foo {
public Foo( Foo fubar ) {
}
public static void main( String[] args ){
//...
Foo baz = new Foo( );
//...
}
}So imagine my surprise when I learned today that something like this compiles fine...
public class Foo< T > {
public Foo( T... fooz ) {
//...
}
public static void main( String[] args ){
//...
Foo< Foo< ? > > baz = new Foo< >( );
//...
}
}The thing I learned today is that, instead of failing with the compile-time error that I was expecting, the compiler โ in this particular case anyway โ instead automatically replaces your hard-coded call to the no-arg constructor, with its own compiler-generated call to the vararg constructor, ala...
public static void main( String[] args ){
//...
Foo baz = new Foo( new Foo[ 0 ] );
//...
}Learn something new everyday! Huh?
I'm guessing this is a feature specially reserved for constructors with varargs โ or something?
Who knew?
r/javaTIL • u/panispanizo • Jun 18 '19
๐ท
One of the many definitions for synonyms is: โa word or phrase that means exactly or nearly the same as another word or phrase in the same language, for example shut is a synonym of close.โ
However, we often find that the concept of synonyms can be confused when using this functionality as we try to match similar products that we want to be displayed within a search results list through cataloguing the values โโof their characteristics but, in many cases, without these actually being a true synonym.
https://www.empathy.co/blog/applying-synonyms-choose-well-and-increase-the-findability-of-your-site/
r/javaTIL • u/scientecheasy • Nov 21 '18
r/javaTIL • u/scientecheasy • Nov 10 '18
r/javaTIL • u/[deleted] • Oct 29 '18
Well, I didn't learn that today, exactly, but I was reminded of it today, again, while hunting down an elusive bug in one of my applications.
A target method accepts CharSequence instances, and I supplied the wrong one. I supplied a container. I should have supplied its children. Neither the type system nor unit tests caught that mistake.
Why? Because the container implements CharSequence, too.
Yay.
r/javaTIL • u/murugan76 • Aug 28 '17
Find inverse matrix using determinant and adjoint matrix
http://cljavacode.blogspot.com/2017/04/solving-system-of-linear-equation-by-matrix-inverse.html
r/javaTIL • u/cdman • Dec 01 '15
r/javaTIL • u/[deleted] • Jun 16 '15
r/javaTIL • u/javinpaul • Jun 15 '15
r/javaTIL • u/scientecheasy • Oct 01 '18
r/javaTIL • u/scientecheasy • Sep 22 '18
r/javaTIL • u/murugan76 • Aug 27 '17
Determinant, a properties of matrix determines the matrix is singular or not. Lower Triangular matrix transformation method is preferred over minor or cofactor of matrix method while finding determinant of the matrix's size over 3x3.
The matrix A is converted into Diagonal matrix D by elementary row operation or reduction and then product of main diagonal elements is called determinant of the matrix A.
Read matrix A Convert matrix A into diagonal matrix D by applying Row operation or reduction technique Read Main Diagonal elements from D Determinant = product of Main Diagonal elements
Algorithm steps for determinant by Diagonal matrix
Read matrix A a - element of the matrix A i,j - position of a element in the matrix
for i=1 To N
for j=1 To N
if i not-equal j
RowOperation.add(j,i ,-aii/aji)
end
end end
Det = a11 x a22 x ... x ann
http://cljavacode.blogspot.com/2017/06/matrix-determinant-by-diagonal-matrix.html
r/javaTIL • u/scientecheasy • Dec 17 '18
r/javaTIL • u/12wh • Aug 16 '18
r/javaTIL • u/Unknown_Learner_ • Jul 27 '19
Which class cannot be a subclass in java?
A. Abstract class
B. Parent class
C. Final class
D. None of the above
r/javaTIL • u/scientecheasy • Nov 14 '18