Technology Guruu

  • Home
  • Site Info
    • About Us
    • Disclaimer
    • Privacy Polacy
  • Home
  • Digital Marketing
    • SEO
    • SMM
    • SEM
  • Quotes
  • Technical
  • Java
  • .Net
    • C#.Net
    • ASP.Net
  • Keychains
Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Friday, 17 March 2017

Top 10 Difference between Java and .Net

 Akansha     00:00:00     C#.Net, Java, TechnicalQuestions     No comments   

I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it. I've been asked this question on my job interview and I thought it might be useful to learn a bit more.
In Previous articles We clearly Mention what is java,what is net, and complete explanation about java programming language.

Difference Between Java and .Net

Difference Between Java and .Net

1..NET languages are richer than Java. They have object oriented feature that are absent in java e.g properties,delegates,generics.
2.Many programs that would have been difficult to develop with java have been developed with .NET things like compilers (Mono's C# and VB.NET) 3D game engines (unity game engine) e.t.c
                                         *****Difference between java and .net*****
3.You can code on the .NET platform using Java but you cannot code on Java platform using any of the .NET languages.
4. .Net is Partly about Drag n Drop. Java is all about coding coding and coding. Java can be also drag & drop. It can be done using eclipse & net-beans editor.
                                         *****Comparison of the Java and .NET platforms*****
5.Java is a light weight language and can be run on almost all the OS. Light weight doesn't means that it have less capability then .Net rather it means that it do not trigger the computer with lots of load and Hard Disk space. Whereas .Net needs a very heavy framework to be installed which have higher Hardware requirements too compared to Java.
6. The .Net garbage collector does not wipe away your objects as and when it likes, but will do the garbage collection in more efficient manner than Java. Basically in Java it has been upto the programmer to clean the memory manually whereas this task is moreover automated in .Net
                                         *****Difference between Java and .NET*****
7. Like .Net garbage collector runs at a certain interval and see is there is any memory occupied by any object whose parent is now finished processing (for eg. you closed an application), in this case the garbage collector automatically removes the reference of that object and free up the memory, whereas in Java you need to confirm it that all the objects are destroyed before application quits.
8. On the other hand Java has a major advantage that it can be run on any OS which is able to install JVM. This is a major disadvantage with .Net.
                                         *****What is the difference between java and .Net?*****
9. Also, for .Net a standard development IDE is available that is Microsoft Visual Studio. This tool comparises of all the things you require for your development purpose (Each and every thing you may think need of are at single place).
10..net provide more user friendliness when designing the forms for example in .net we drag and drop controls into form which is not at all mind teasing process.developer can concentrate on the logic or other security issues.
                                         *****What is the difference between java technology and .net technology?*****
11.where as in java code for creating a simple control like button also takes a lot of programming for a developer.
                       *****difference between c and java in tabular form*****
Friends You Like My Post Please Share To Your Friends Through Facebook,Twitter,Google+ ,LinkedIn and Stumble once.
Also Read:Top 10 .Net Interview Questions and Answers
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Thursday, 26 January 2017

Updated Keywords in Java And Usage Of Java Keywords

 Akansha     00:00:00     Java, TechnicalQuestions     No comments   

What are the Updated Java Keywords in 2016

Keywords are the heart of any programming language they play main role in developing programming.so friends first we have to concentrate on java keywords and how many keywords are there in java and what are the keywords and how they work.When and where we can use these keywords properly in our java language.
Java Keywords

Java Keywords in Java

Hi friends, Anyone know the count of keywords in java? and also how these keywords work? and when it can be applicable properly in developing program?.I think some one knows and some ones don't know. That's why we are look our blog! no problem, who are want java keywords for these peoples i place keywords in proper manner and also give best explanation about these keywords.

  1. Abstract
  2. Assert
  3. Boolean
  4. Break
  5. Byte
  6. Case
  7. Catch
  8. char
  9. class
  10. const
  11. default
  12. do
  13. double
  14. else
  15. enum
  16. extends
  17. final
  18. finally
  19. float
  20. for
  21. goto
  22. if
  23. implements
  24. import
  25. instanceof
  26. int
  27. interface
  28. long
  29. native
  30. new
  31. package
  32. private
  33. protected
  34. public
  35. return
  36. short
  37. static
  38. strictfp
  39. super
  40. switch
  41. synchronized
  42. this
  43. throw
  44. throws
  45. transient
  46. try
  47. void
  48. volatile
  49. while
  50. continue 
Here I shared total 50 keywords but all of you don't know about following words
  1. True 
  2. False 
  3. Null
These above 3 true,false&null called pre-defined literals these 3 are not a keywords in java.
In java, one keyword is not used in java that keyword is Goto.This keyword is not used in java because by using this we can get a pointers concept in java its so difficulty that's why we are not used in java .Oracle also deprecated Goto keyword from java.
Found this article useful then share it with others because sharing is caring. Also comment if you have any query then feel free to ask, I will come with the answer.

Do you have More info on Java Programming Language or OOPS Concepts Visits My Previous Posts
1.About Servlets
2.Java Inteview Questions and Answers
3.Logical interview questions for freshers.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Best Tutorial of Constructors in OOPS

 Akansha     00:00:00     Java, TechnicalQuestions     No comments   

Constructors and Methods are the heart for our programming languages like java,c#.net,vb.net etc Any developer first know the value of constructors and methods and what are the difference between methods and constructors.How it can be placed in programming development.

Best Description about Constructors in object oriented programming

In object oriented Programming(oops) have many important topics in this constructors is the one of the good topic.Constructors is most relavent asking question in interview purpose for fresher/experience candidates,the frequently asking questions are what is static constructor and dynamic constructor what are the differences.
constructors

In constructors we hava two types
1.Static Constructor
2.Dynamic Constructor
Static Constructor:It is Common for all like college name.
Dynamic Constructor:It is Individuals for all like student rollno.
The following Questions and Answers are give a datail explanation about constructors.

1)what is constructor?

Ans:constructor is a member of a class which is special type of function

2)constructor can have any return type?

Ans:constructor will not return any value.So it will not have return type.

3)Features of Constructor?

Ans:1.class name and construtor name should be same

2.constructor can contain parameters

3.constructor can invoke automatically when an object is created.

4)what is instance constructor?

Ans:while defining a constructor if we did not use static keyword it is called as instance constructor.

5)what is the purpose of instance constructor?

Ans:purpose of instance constuctor is to initialize instance variables.

6)instance constructors can contain parameters or not?

Ans:instance constructor can contain parameters

7)what is static constructor?

Ans:while defining a static constructor if we have used static keyword which is called as static constructor.

8)what is purpose of static constructor?

Ans:static constructor purpose is to initialize instance variables.

9)How to initialize static variable?

Ans:By using static constructor.

10)When we will go for static variable?

Ans:Whenever we want to represent a comman value for all objects we will declare as a static variable.

11)When class will be loading and when class will be unloading?

Ans:Whenever CLR required to execute any part of the class then it will load concern class from application to CLR.
Whenever application execution is completed then all the classes will be unloading.

12)static constructor is a parameterized or parameterless constructor?

Ans:static constructor is a parameterless constructor

13)When static constructor will invoke?

Ans:when class is loading static constructor will be invoke automatically.

14)When instance constructor will invoke?

Ans:when object is created instance constructor will be invoke

15)How many static constructors in one class?

Ans:A class can contain only one static constructor because by default it is a parameterless constructor.

16)If a class is having one instance constructor and one static constructor which will execute first?

Ans:First static constructor will execute next instance constructor will execute because class will load first then object will create.

Example for static constructor and instance constructor

class Employee
{
static Employee()
{
comname="wipro";
}
internal Employee()
{
eno=111;
ename=ram;
esal=5000;
}
Recommended Articles
1.Tutorial of Methods Concept
2.Tutorial of Parameters Passing Mechanism
3.Tutorials of Multiple Inheritance
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Friday, 11 November 2016

Passing Parameter Mechanism in C#.Net and Java

 Akansha     12:00:00     C#.Net, Java, TechnicalQuestions     No comments   

After Listening about the topic passing parameter mechanism in C#.net, first i feel very difficult but after reading and doing some practical examples i feel very easy.The Parameter passing mechanism plays key role in program development so first concentrate on some tips for parameter passing.Here i am not only placing definition i place My practically doing examples.
Here i Covering the topics are Introduction about parameter passing,what is parameter, how parameter helpful to us,types parameter passing, and types of parameter passing mechanism.
Actually the passing parameter mechanism same in C#.net and Java but the examples are different.C#.net develpers just follow this concept and Java developers or learners just modify your examples in java process.
Passing Parameter mechanism

Passing Parameter Mechanism 

Parameter Passing easy to understand But when develop C#.Net program at that time confusion is came Which Parameters is pass or at this time parameter passing is necessary or not.so,you want get more clarity on parameter passing we simply develop any project with short period so,friends please concentrate on the below topic i write clear description about parameter passing i hopeful it is understand to all and also helpful in interview purpose.
                          *****Introduction about Parameters*****

Introduction about Parameter

Passing a value to function is called as passing parameter mechanism

What is parameter?

A variable which is declared with in the method signature is called as parameter.

Why Parameter?

Whenever a method is required some value for it's functionality from outside we will go for parameter.                    

Types of Parameters:-

               In C#.net we have two types of parameters.
1.Formal Parameter
2.Actual Parameter
  *****Types of parameters*****

1.Formal Parameter

         called function parameter is formal parameter.
 *****Formal Parameters*****

2.Actual Parameter

         Calling function parameter is actual parameter.
Ex;-class Myclass
{
internal void add(int a,int b)//called function,formal parameters
{
int c=a+b;
Console.WriteLine("result is:"+c);
}
}
class Program
{
static void Main()
{
Myclass obj= new Myclass();
int x=10;
int y=20;
obj.add(x,y);//calling function,actual parameters
}
}
**************Actual Parameters*****************
C#.net will support three types of passing parameter mechanism
1.Call by value
2.Call by reference
3.Call by out

1.Call by value

In call by value when formal parameters are modified the modifications will not be reflected back to actual parameters.
In call by value while passing the parameter we will pass the actual value.
Ex:-class Myclass
{
intenal void PayFee(int a)
{
a=a+1500;
Console.WriteLine("a value is:+a);
}
}
class Program
{
static void Main()
{
Myclass obj=new Myclass();
int x=1000;
obj.PayFee(x);
Console.WriteLine("X value is:"+x);
Console.ReadLine();
}
}
*****call by value in parameter passing*****

2.Call by reference

       In call by reference when formal parameters are modified those modifications will be reflecting back to actual parameters.
In call by reference while passing the parameter we will pass the address of value.
Ex:-class Myclass
{
intenal void Add(ref int a)
{
a=a+1500;
Console.WriteLine("a value is:+a);
}
}
class Program
{
static void Main()
{
Myclass obj=new Myclass();
int x=1000;
obj.Add(ref x);
Console.WriteLine("X value is:"+x);
Console.ReadLine();
}
}    *****call by reference parameter passing*****

3.Call by out

call by out is same as call by reference,In call by out also when formal parameters are modified those modifications will be reflecting back to actual parameter.
While passing parameter or while catching parameter we should use out keyword.
In call by out also with the help of parameter we will pass the address.
out parameter is not required to initialize,If we initialize also CLR will ignore that value.
Ex:-class Myclass
{
internal void PayFee(out int totfee)
{
int admFee=1500;
int semFee=1200;
totFee=admFee+semFee;
Console.WriteLine("total fee is:"+totFee);
}
}
class Program
{
void Main()
{
Myclass obj=new Myclass();
int x;
obj.PayFee(out x);
Console.WriteLine("x value is:+x);
Console.ReadLine();
}
}        *****call by out parameter passing*****
Are you Looking For More Topics on C#.Net please visit My Previous Post i feel those are helpful to you
Introduction about Methods in C#.Net
Exception handling Mechanism explanation
Logical Programming Examples on whileloop
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Monday, 31 October 2016

Brief Descriptions About Methods

 Akansha     10:30:00     C#.Net, Java, TechnicalQuestions     No comments   


Constructors and Methods are the heart for our programming languages like java,c#.net,vb.net etc Any developer first know the value of constructors and methods and what are the difference between method and constructors.How it can be placed in programming development.

Methods in C#.Net

methods
methods
According to parameters,methods are classified into two types
1.Parameterless method
2.Parameterize method

1.Parameterless method:-

While defining a method if we didn't declare any parameters which is called as parameterless method.

Q)When we will go for parameterless method?

Ans:According to method functionality if the method doesnot required any value then we will go for parameterless method.
EX:-class Program
{
void Display()
{
Console.WriteLine("welcome to c#.net");
Console.WriteLine("welcome to Asp.net" );
}
}

2.Parameterize method:-

While defining a method if we have declared parameter which is called as parameterized method.

Q)When we will go for parameterized method?

Ans:According to requirement whenever a method is required some value for it's functionality then we will go for parameterized method.
EX:-class Program
{
void add(int a,int b)
{
int c=a+b;
Console.WriteLine("result is:"+c);
}
}
According to method return types methods are classified in to two types
1.Void method
2.Non-Void method

1.Void method:-

A method which is not returning any value according to it's functionality is called as void
method.Void method return type should be void.

Q)When we will go for void method?

Ans:According to the requirement if the method does not require to return any value we will go for void method.

2.Non-Void method:-

A method which is returning some value is called as non-void method.

Q)When we will go for non-void method?

Ans:According to method functionality if it requires to return some value we will go for non-void method.the return type of method will be depending on type of the value which is returning by the method.If the method requires to return numerical values then method return type can be any one of the numerical data type like int,long,short............................
Ex:-int fun(int a)
{
return a;
}
char fun1(char a)
{
return a;
}
Again methods are classified into two types
1.Instance method or Non-static method
2.Static method

1.Instance method or Non-static method:-

While defining a method if we didn't use static keyword which is called as instance method.If we want to access instance method with the help of object.
Ex:-class Employee
{
ulong empid;
string empname;//instance variables
internal void Display()
{
Console.WriteLine("Enter employee id ");
ulong empid=ulong.Parse(Console.ReadLine());
Console.WriteLine("Enter employee name ");
string empname=Console.ReadLine();
Console.WriteLine("employee id is:"+empid);
Console.WriteLine("employee name is:"+empname);
}
}
class Program
{
static void Main(string args[])
{
Employee a=new Employee();
a.Display();//calling instance method
Console.ReadLine();
}
}

2.Static method:-

While defining a method if we are using static keyword which is called as static method.If we want to access static method we have to access with the help of class name.
Ex:-
class Employee
{
static string compname;
static string comploc;//static variables
static internal void Display()
{
compname="wipro";
comploc="Hyderabad";
}
}
class Program
{
static void Main(string args[])
{
Employee.Display();//calling static method
Console.ReadLine();
}
}
Methods topic in c#.net are most important to everyone so please share it to your friends also through facebook,twitter,google plus.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Friday, 28 October 2016

Best Explanation about Exception Handling In Java

 Akansha     13:00:00     C#.Net, Java, TechnicalQuestions     No comments   

Introduction about Exception Handling

Friends Anyone Knows the Full Explanation About Exception Handling.Why it came's how it can be useful in Programming Development and what are the problems we are having through Exception.Below I place The Answers for these Questions.

Updated Exception Handling In Java

Exception Handling

Q)What is Exception?

Exception is an abnormal condition.
In java, exception is an event that disrupts the normal flow of the program.
syntax:
public class MyException
{
public static void main(String[] args)
{
try
{
return;
}
finally
{
System.out.println( "Finally" );
}
}
}

Use Of Exception Handling

The core advantage of exception handling is to maintain the normal flow of the application.
Exception normally disrupts the normal flow of the application that is why we use exception 
handling. Let's take a scenario:
statement1;
statement1;
statement2;
statement3;
statement4;
statement5;
statement6;/*exception occurs at statement 6*/
statement7;
statement8;
statement9;
statement10;
statement11;
Suppose there is 11 statements in your program and there occurs an exception at statement 6, rest of the code will not be executed i.e. statement 6 to 11 will not run. If we perform exception handling, rest of the statement will be executed. That is why we use exception handling in java.
Friends You Like My Post Please Share to your Friends because sharing is caring.Share the Link through Social Medial Like Facebook,Google+,Twitter etc and You feel to ask any Question about this Topic i clarify your doubts.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

How Many Members Know About Access Modifiers Completely

 Akansha     12:30:00     C#.Net, Java, TechnicalQuestions     No comments   

Friends Today MY Topic is Access Modifiers.This Topic Is Heart For Any Programming Language because every developer first know the usage of public,private,protected,internal,protected internal i simply say you know the access modifiers.The Access Modifiers are Common in All programming languages like c#.net,java,vb.net etc but small difference in usage.So,first we learn the C#.Net access Modifiers i place the best description for you.

Access Modifiers in C#.NET And Java

Java Access Modifiers
All Access Modifiers
  •  Access Modifiers are public,private,protected,internal and protected internal.This access Modifiers are very important and precious topic because when we place public  and where we place public and what has done place the public within assembly and what happening place place the public in outside the assembly.This types of queries are occur for every access modifiers .
  •  Access Modifiers topic very easy to understand and in this each modifier when its work like its work in inheritance,interface,abstract etc.
                           *************Introduction**************

Introduction

   Access modifiers or Access specifiers are keywords which are specifying the accessability or access level of class members.
While defining a class or while declaring a class member we can define the accessibility with the help of access modifier.
In C#.Net we have 5 access modifiers. They are
1.Public
2.Private
3.Protected
4.Internal
5.Protected Internal
                                                    *************Public**************                    

1.Public

              If we declare a class or class member as public which can be accessed by all the classes of current project and all the projects of application.
To access a public member there is no restriction with in the application
Ex:-class class1
{
public int a=10;
public void method1()
{
Console.WriteLine("method1 value is:"+a);
}
}
class class2
{
 public void method2()
{
class1 obj=new class1();
Console.WriteLine("method2 value is:"+obj.a);
}
}
class Program
{
static void Main(String[] args)
{
class1 obj1=new class1();
Console.WriteLine("main method value is:"+obj1.a);
obj1.method();
class2 obj2=new class2();
obj2.method();
Console.ReadLine();
}
}
                                  *************Private**************

2.Private               

                     If we declare a class or class member as private, which can be accessed only with in that class.
Ex:-class class1
{
private int a=10;
public void method1()
{
Console.WriteLine("method1 value is:"+a);
}
}
class Program
{
static void Main(String[] args)
{
class1 obj1=new class1();
obj1.method1();
Console.ReadLine();
}
}
                                      *************Protected**************

3.Protected

               If we declare a class or class member as protected which can be accessed by current class members as well as derived class members.
Protected is depending on inheritance concept.
Ex:-class class1
{
protected int a=10;
public void method1()
{
Console.WriteLine("method1 value is:"+a);
}
}
class class2:class1
{
public void method2()
{
Console.WriteLine("method1 value is:"+a)
}
}
class Program
{
static void Main()
{
class2 obj=new class2();
obj.method2();
obj.method1();
Console.ReadLine();
}
}

                                       *************Internal**************

4.Internal

            If we declare a class or class member as internal which can be accessed by all the classes of current project.
Ex:-class class1
{
internal int a=10;
public void method1()
{
Console.WriteLine("method1 value is:"+a);
}
}
class class2
{
 public void method2()
{
class1 obj=new class1();
Console.WriteLine("method2 value is:"+obj.a);
}
}
class Program
{
static void Main(String[] args)
{
class1 obj1=new class1();
Console.WriteLine("main method value is:"+obj1.a);
obj1.method1();
class2 obj2=new class2();
obj2.method2();
Console.ReadLine();
}
}
Share With Your Friends in Social Media (Facebook, Twitter, Google Plus Etc...) if You Like Our Content And Feel Free To Comment.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Brief Description About Servlets-Short Note On Servlets

 Akansha     10:30:00     Java, TechnicalQuestions     No comments   

Friends  Today I Would Like TO Write The Topic is Servlets In Java.First We are Know The Importance Of Servlets and Why it can be Used in Java,What are the Topic we have Related To Servlets and how important in Servlets is the most important topic in Java .This article  is very helpful to understand Servlets topic.

Servlets in Java

Servelet introduction
Servlets

Introduction about Servlets

A Servlet is a Java Program that is execute at the serverside.Servlet related classes are contained in two packages.
1.Javax.servlet.*;
2.Javax.servlet.http.*;
  • A simple java Program gets the functionality of a servlet by eithe extending generic servlet or http servlet.
  • user interface is used to gather a request from a person and forward these request to a component for processing.the component that processes the request is belt using servlet or jsp previously. we used CGI technology used.
  • Common Gateway interface is slow in response.
  • A client can send a request to server in two ways.
1.get()
2.post()
  • If you use get()method from contains will appear in the url.It is not very secure.
  • post()method is secure way to send the data.

Servlets Lifecycle

Life Cycle of servlets
Life Cycle

Servlet life cycle contains 3 stages

1.Init()
2.Service()
3.Destroy()
  1. Init() method is executed when the servlet is first time loaded into memory.
  2. Service() method is execute each time when a client makes some request.Service()method can be replaced diGet() or doPost() method.
  3. A deployment descripter file(web.xml) will help us in managing servlets.we can also givewelcome file information inside that file.
  4. A servlet container is the where all servlets run.
Found this article useful then share it with others because sharing is caring. Also comment if you have any query then feel free to ask, I will come with the answer. :)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Older Posts Home

Popular Posts

Categories

  • Entertainment (67)
  • TechnicalQuestions (58)
  • Quotes (11)
  • C#.Net (8)
  • Java (8)
  • ValentinesDay (4)
  • SEO (3)
  • Home
  • About Us
  • Disclaimer
  • Privacy Policy
  • Sitemap

Copyright © 2015-2017 Good Friends 5.All Rights Reserved• And Our Sitemap • All Logos and Trademark Belongs To Their Respective Owners•