Filter
Exclude
Time range
-
Near
25 Jul 2024
🧵 Java Series (Deep Learning) 3: Understanding Encapsulation with Class and Object Hi, X Family! 🌞 In our last thread, we explored OOP concepts. Today, let's dive into encapsulation with class and object in detail. Encapsulation is about bundling data (attributes) and methods (behaviors) together. #Java #OOP #Encapsulation What is a class? 🤔 A class is like a blueprint or template for creating objects. - Think of it as a blueprint for a house. The blueprint defines what a house is (walls, doors, windows, etc.), but it's not a house itself. #JavaClass #programming -If the class is the blueprint for a house, then the object is the actual house built from that blueprint. - So, an object is an instance of a class. Each house built from the same blueprint can have different colors, sizes, but they all follow the same basic design. Class: (has below data members) Variables (attributes): Variables that belong to the class, describing the state or characteristics of an object. E.g., in the Account class, accountNumber, accountBalance are attributes. Methods (Behaviors): Methods that belong to the class, describing the actions the object can perform. E.g., we can withDrawMoney() from Account. #JavaAttributes #JavaMethods Constructor: Constructor is a special method, which initialize class attributes, when creating an object. - if a method is constructor, then class name and method name should be same Object (Instance): When you create an object from a class, you allocate memory to store the values of the attributes and provide implementations for the methods defined in the class. #JavaInstance - we will create an object by using new keyword and constructor. - within the Account class we bundled everything (variables, methods and constructor). - It ensures that data is safely contained within objects, making your code more modular and easier to maintain.
2
5
1,041
Our expert-led course is designed to elevate your programming skills, teaching you to create robust and sophisticated software solutions. Link : zurl.co/Q5Ij Call = 918308103366 #Java #Programming #JavaDeveloper #TechSkills #JavaTraining #JavaClass
1
13
5 Principles of Object Oriented Design (SOLID) 🚨 Join Waiting List for New 10 Hour Linux Course - bit.ly/44CI2bK #java #javaarrayclass #javaclass #javascript #Objectorienteddesign #SolidJava #SoftwareEngineering
2
121
448
39,615
Replying to @oprimodev
Para ser justo, o exemplo do Java 21 não precisa declarar a 'JavaClass'. Isto é, poderá ser apenas: void main() { System.out.println("Hello, World!"); } Será uma funcionalidade 'preview' no Java 21. Quem tiver interesse no assunto, fiz uma thread:

A JEP 445 deve facilitar o ensino e o aprendizado da linguagem Java. A proposta (ainda sem data definida) introduzirá dois novos conceitos: - métodos 'main' de instância - classes sem nome Eu explico em detalhes nesta thread.
21
3,141
What about \def? Also, I define a lot of "semantic formatting" commands like \file or \javaclass to make sure I get things consistent. Isn't this basically removing the big advantage of LaTeX?
1
5
1,528
KotlinでJavaのClass取得する時って大概::class.javaって書いてたんだけど、::javaClassって書いた方が結構高速やんけ 知らんかった

1
2
191
任意のJavaClassファイル実行ってなんで外部入力をevalしてんだよ()
2
6
Hello, world! #FridayFun is here! If I were a @java Class what would I be? And why? Prize🏆: FREE ticket to @jloveconf  What you need to do: ✅Write the funniest answer  ✅RT this post Next Friday we will announce the winner🥇!  #FridayFun #JavaClass
1
2
2
教えて頂いた、SharedPreferenceにList<String>型のデータを保存&呼び出しに関するコードです。 fromJsonの第2引数にArrayList<String>().javaClassを指定するのがポイントでした!
Replying to @fumiyasac
参考になるかわからんですが、List<String>なデータ作って、保存から読み出し成功しました。(読み出し後のArrayListになっちゃってるけど) gist.github.com/sho-ito-1027…
4
There is an open issue about that(github.com/TNG/ArchUnit/issu…). Until then you should be able to do classes().that(DescribedPredicate.describe("are top-level", javaClass -> !javaClass.getEnclosingClass().isPresent()))

Java Classes in Pune is provides Multiple Choice Question on Java Constructors. Comment your Right answer on below Comment box. This question will help to cracking the interview. #QuestionAnswer #Java #Technology #IT #Javadeveloper #JavaClass #Javaclassesinpune #Javadatabase
2